Skip to content

Commit

Permalink
Merge bitcoin#24527: test: set segwit height back to 0 on regtest
Browse files Browse the repository at this point in the history
5ce3057 test: set segwit height back to 0 on regtest (Martin Zumsande)

Pull request description:

  The change of `consensus.SegwitHeight` from 0 to 1 for regtest in bitcoin#22818 had the effect that if I create a regtest enviroment with  current master (or 23.x), and then try to load this chain with an older version (22.x), I get an InitError
  `Witness data for blocks after height 0 requires validation. Please restart with -reindex`
  and have to reindex because `BLOCK_OPT_WITNESS` is no longer set for the Genesis block and `NeedsRedownload()` in validation returns `true` with an older version.
  That might be a bit annoying for tests that use a shared regtest dir with different versions.

  If people think this is enough of an issue to be worth fixing, I think it should also make it into 23.x

ACKs for top commit:
  theStack:
    Concept and code-review ACK 5ce3057

Tree-SHA512: b0e89ff7fc953bc0ae929d2da44cde7149321d987fb4763934f6c9635d00d807129a50b459cc5e69e86bb1819e4b063b969486e8016a1cb8db8f905fa315653d
  • Loading branch information
MarcoFalke authored and knst committed Nov 21, 2024
1 parent acad6de commit 80ef2b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ class CRegTestParams : public CChainParams {
consensus.BIP34Hash = uint256();
consensus.BIP65Height = 1; // Always active unless overridden
consensus.BIP66Height = 1; // Always active unless overridden
consensus.BIP147Height = 1; // Always active unless overridden
consensus.BIP147Height = 0; // Always active unless overridden
consensus.CSVHeight = 1; // Always active unless overridden
consensus.DIP0001Height = 1; // Always active unless overridden
consensus.DIP0003Height = 432; // Always active for DashTestFramework in functional tests (see dip3params)
Expand Down

0 comments on commit 80ef2b2

Please sign in to comment.