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()
196
196
197
197
TestChain100Setup::TestChain100Setup ()
198
198
{
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
-
205
199
// Generate a 100-block chain:
206
200
coinbaseKey.MakeNewKey (true );
207
201
CScript scriptPubKey = CScript () << ToByteVector (coinbaseKey.GetPubKey ()) << OP_CHECKSIG;
@@ -222,12 +216,7 @@ CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransa
222
216
for (const CMutableTransaction& tx : txns) {
223
217
block.vtx .push_back (MakeTransactionRef (tx));
224
218
}
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);
231
220
232
221
while (!CheckProofOfWork (block.GetHash (), block.nBits , chainparams.GetConsensus ())) ++block.nNonce ;
233
222
You can’t perform that action at this time.
0 commit comments