Skip to content

Commit 666696b

Browse files
author
MarcoFalke
committed
test: Have segwit always active in (Basic)TestingSetup
1 parent 6a135fb commit 666696b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/test_bitcoin.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName)
4242
InitSignatureCache();
4343
InitScriptExecutionCache();
4444
fCheckBlockIndex = true;
45-
// CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
46-
// TODO: fix the code to support SegWit blocks.
47-
gArgs.ForceSetArg("-vbparams", strprintf("segwit:0:%d", (int64_t)Consensus::BIP9Deployment::NO_TIMEOUT));
4845
SelectParams(chainName);
4946
noui_connect();
5047
}
@@ -115,6 +112,11 @@ TestingSetup::~TestingSetup()
115112

116113
TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST)
117114
{
115+
// CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
116+
// TODO: fix the code to support SegWit blocks.
117+
gArgs.ForceSetArg("-vbparams", strprintf("segwit:0:%d", (int64_t)Consensus::BIP9Deployment::NO_TIMEOUT));
118+
SelectParams(CBaseChainParams::REGTEST);
119+
118120
// Generate a 100-block chain:
119121
coinbaseKey.MakeNewKey(true);
120122
CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;

0 commit comments

Comments
 (0)