File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -196,12 +196,6 @@ TestingSetup::~TestingSetup()
196196
197197TestChain100Setup::TestChain100Setup ()
198198{
199- // CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
200- // TODO: fix the code to support SegWit blocks.
201- gArgs .ForceSetArg (" -segwitheight" , " 432" );
202- // Need to recreate chainparams
203- SelectParams (CBaseChainParams::REGTEST);
204-
205199 // Generate a 100-block chain:
206200 coinbaseKey.MakeNewKey (true );
207201 CScript scriptPubKey = CScript () << ToByteVector (coinbaseKey.GetPubKey ()) << OP_CHECKSIG;
@@ -222,12 +216,7 @@ CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransa
222216 for (const CMutableTransaction& tx : txns) {
223217 block.vtx .push_back (MakeTransactionRef (tx));
224218 }
225- // IncrementExtraNonce creates a valid coinbase and merkleRoot
226- {
227- LOCK (cs_main);
228- unsigned int extraNonce = 0 ;
229- IncrementExtraNonce (&block, ::ChainActive ().Tip (), extraNonce);
230- }
219+ RegenerateCommitments (block);
231220
232221 while (!CheckProofOfWork (block.GetHash (), block.nBits , chainparams.GetConsensus ())) ++block.nNonce ;
233222
You can’t perform that action at this time.
0 commit comments