Skip to content

bch(g3): testnet4 own LevelDB sharechain namespace (stacked on #615) - #616

Merged
frstrtr merged 1 commit into
masterfrom
bch/testnet4-leveldb-label
Jul 3, 2026
Merged

bch(g3): testnet4 own LevelDB sharechain namespace (stacked on #615)#616
frstrtr merged 1 commit into
masterfrom
bch/testnet4-leveldb-label

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 3, 2026

Copy link
Copy Markdown
Owner

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).

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.
@frstrtr
frstrtr changed the base branch from bch/testnet4-magic-path to master July 3, 2026 20:02
@frstrtr
frstrtr merged commit 2530888 into master Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant