bch(g3): testnet4 own LevelDB sharechain namespace (stacked on #615) - #616
Merged
Conversation
main_bch.cpp sets m_testnet=true for testnet3|testnet4|regtest, so the node.hpp net_name ternary labelled testnet4 storage "bitcoincash_testnet" -- colliding with testnet3 shares in one LevelDB namespace. Select "bitcoincash_testnet4" when m_testnet4 so each net keeps an isolated sharechain store. Non-consensus, BCH-isolated, header-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #615 (bch/testnet4-magic-path). Depends on the m_testnet4 selector it adds; GitHub will retarget to master once #615 merges.
Problem: main_bch.cpp sets m_testnet = testnet || testnet4 || regtest, so under --testnet4 the node.hpp net_name ternary picked "bitcoincash_testnet" -- the testnet3 label. testnet3 and testnet4 sharechains would share one LevelDB namespace and cross-contaminate on any host that ran both.
Fix (1 file, src/impl/bch/node.hpp): select "bitcoincash_testnet4" when m_testnet4, else fall through to the existing testnet3/mainnet labels. Isolation-primitive (3-bucket #1): keep per-net namespacing; do not unify.
Scope: BCH-isolated, non-consensus, header-only. No src/core, no bitcoin_family, no peer-coin hunks.
Verify: .198 build EXIT=0; ctest -R bch = 27/27 PASS (assembly/seam tests exercise the storage namespace). GPG-signed 285EFE76, zero attribution.
surface-for-tap -- NO self-merge (integrator merges on operator push approved).