File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ TestChain100Setup::TestChain100Setup()
129
129
// CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
130
130
// TODO: fix the code to support SegWit blocks.
131
131
gArgs .ForceSetArg (" -segwitheight" , " 432" );
132
+ // Need to recreate chainparams
132
133
SelectParams (CBaseChainParams::REGTEST);
133
134
134
135
// Generate a 100-block chain:
@@ -142,12 +143,9 @@ TestChain100Setup::TestChain100Setup()
142
143
}
143
144
}
144
145
145
- //
146
146
// Create a new block with just given transactions, coinbase paying to
147
147
// scriptPubKey, and try to add it to the current chain.
148
- //
149
- CBlock
150
- TestChain100Setup::CreateAndProcessBlock (const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey)
148
+ CBlock TestChain100Setup::CreateAndProcessBlock (const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey)
151
149
{
152
150
const CChainParams& chainparams = Params ();
153
151
std::unique_ptr<CBlockTemplate> pblocktemplate = BlockAssembler (chainparams).CreateNewBlock (scriptPubKey);
@@ -175,6 +173,7 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>&
175
173
176
174
TestChain100Setup::~TestChain100Setup ()
177
175
{
176
+ gArgs .ForceSetArg (" -segwitheight" , " 0" );
178
177
}
179
178
180
179
You can’t perform that action at this time.
0 commit comments