@@ -70,7 +70,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
70
70
fCheckpointsEnabled = false ;
71
71
72
72
// Simple block creation, nothing special yet:
73
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
73
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
74
74
75
75
// We can't make transactions until we have inputs
76
76
// Therefore, load 100 blocks :)
@@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
99
99
delete pblocktemplate;
100
100
101
101
// Just to make sure we can still make simple blocks
102
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
102
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
103
103
delete pblocktemplate;
104
104
105
105
// block sigops > limit: 1000 CHECKMULTISIG + 1
@@ -117,7 +117,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
117
117
mempool.addUnchecked (hash, CTxMemPoolEntry (tx, 11 , GetTime (), 111.0 , 11 ));
118
118
tx.vin [0 ].prevout .hash = hash;
119
119
}
120
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
120
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
121
121
delete pblocktemplate;
122
122
mempool.clear ();
123
123
@@ -137,14 +137,14 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
137
137
mempool.addUnchecked (hash, CTxMemPoolEntry (tx, 11 , GetTime (), 111.0 , 11 ));
138
138
tx.vin [0 ].prevout .hash = hash;
139
139
}
140
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
140
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
141
141
delete pblocktemplate;
142
142
mempool.clear ();
143
143
144
144
// orphan in mempool
145
145
hash = tx.GetHash ();
146
146
mempool.addUnchecked (hash, CTxMemPoolEntry (tx, 11 , GetTime (), 111.0 , 11 ));
147
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
147
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
148
148
delete pblocktemplate;
149
149
mempool.clear ();
150
150
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
162
162
tx.vout [0 ].nValue = 5900000000LL ;
163
163
hash = tx.GetHash ();
164
164
mempool.addUnchecked (hash, CTxMemPoolEntry (tx, 11 , GetTime (), 111.0 , 11 ));
165
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
165
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
166
166
delete pblocktemplate;
167
167
mempool.clear ();
168
168
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
173
173
tx.vout [0 ].nValue = 0 ;
174
174
hash = tx.GetHash ();
175
175
mempool.addUnchecked (hash, CTxMemPoolEntry (tx, 11 , GetTime (), 111.0 , 11 ));
176
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
176
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
177
177
delete pblocktemplate;
178
178
mempool.clear ();
179
179
@@ -191,7 +191,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
191
191
tx.vout [0 ].nValue -= 1000000 ;
192
192
hash = tx.GetHash ();
193
193
mempool.addUnchecked (hash, CTxMemPoolEntry (tx, 11 , GetTime (), 111.0 , 11 ));
194
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
194
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
195
195
delete pblocktemplate;
196
196
mempool.clear ();
197
197
@@ -205,17 +205,17 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
205
205
tx.vout [0 ].scriptPubKey = CScript () << OP_2;
206
206
hash = tx.GetHash ();
207
207
mempool.addUnchecked (hash, CTxMemPoolEntry (tx, 11 , GetTime (), 111.0 , 11 ));
208
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
208
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
209
209
delete pblocktemplate;
210
210
mempool.clear ();
211
211
212
212
// subsidy changing
213
213
int nHeight = chainActive.Height ();
214
214
chainActive.Tip ()->nHeight = 209999 ;
215
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
215
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
216
216
delete pblocktemplate;
217
217
chainActive.Tip ()->nHeight = 210000 ;
218
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
218
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
219
219
delete pblocktemplate;
220
220
chainActive.Tip ()->nHeight = nHeight;
221
221
@@ -247,7 +247,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
247
247
mempool.addUnchecked (hash, CTxMemPoolEntry (tx2, 11 , GetTime (), 111.0 , 11 ));
248
248
BOOST_CHECK (!CheckFinalTx (tx2, LOCKTIME_MEDIAN_TIME_PAST));
249
249
250
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
250
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
251
251
252
252
// Neither tx should have make it into the template.
253
253
BOOST_CHECK_EQUAL (pblocktemplate->block .vtx .size (), 1 );
@@ -262,7 +262,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
262
262
// BOOST_CHECK(CheckFinalTx(tx));
263
263
// BOOST_CHECK(CheckFinalTx(tx2));
264
264
265
- BOOST_CHECK (pblocktemplate = CreateNewBlock (scriptPubKey));
265
+ BOOST_CHECK (pblocktemplate = CreateNewBlock (chainparams, scriptPubKey));
266
266
BOOST_CHECK_EQUAL (pblocktemplate->block .vtx .size (), 2 );
267
267
delete pblocktemplate;
268
268
0 commit comments