@@ -251,7 +251,7 @@ void FuncDIP3Activation(TestChainSetup& setup)
251251 int nHeight = chainman.ActiveChain ().Height ();
252252
253253 // We start one block before DIP3 activation, so mining a block with a DIP3 transaction should fail
254- auto block = std::make_shared<CBlock>(setup.CreateBlock (txns, setup.coinbaseKey ));
254+ auto block = std::make_shared<CBlock>(setup.CreateBlock (txns, setup.coinbaseKey , chainman. ActiveChainstate () ));
255255 chainman.ProcessNewBlock (Params (), block, true , nullptr );
256256 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight);
257257 BOOST_ASSERT (block->GetHash () != chainman.ActiveChain ().Tip ()->GetBlockHash ());
@@ -261,7 +261,7 @@ void FuncDIP3Activation(TestChainSetup& setup)
261261 setup.CreateAndProcessBlock ({}, setup.coinbaseKey );
262262 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight + 1 );
263263 // Mining a block with a DIP3 transaction should succeed now
264- block = std::make_shared<CBlock>(setup.CreateBlock (txns, setup.coinbaseKey ));
264+ block = std::make_shared<CBlock>(setup.CreateBlock (txns, setup.coinbaseKey , chainman. ActiveChainstate () ));
265265 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
266266 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
267267 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight + 2 );
@@ -288,7 +288,7 @@ void FuncV19Activation(TestChainSetup& setup)
288288
289289 int nHeight = chainman.ActiveChain ().Height ();
290290
291- auto block = std::make_shared<CBlock>(setup.CreateBlock ({tx_reg}, setup.coinbaseKey ));
291+ auto block = std::make_shared<CBlock>(setup.CreateBlock ({tx_reg}, setup.coinbaseKey , chainman. ActiveChainstate () ));
292292 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
293293 BOOST_ASSERT (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params ().GetConsensus (), Consensus::DEPLOYMENT_V19));
294294 ++nHeight;
@@ -306,7 +306,7 @@ void FuncV19Activation(TestChainSetup& setup)
306306 operator_key_new.MakeNewKey ();
307307 auto tx_upreg = CreateProUpRegTx (chainman.ActiveChain (), *(setup.m_node .mempool ), utxos, tx_reg_hash, owner_key, operator_key_new.GetPublicKey (), owner_key.GetPubKey ().GetID (), collateralScript, setup.coinbaseKey );
308308
309- block = std::make_shared<CBlock>(setup.CreateBlock ({tx_upreg}, setup.coinbaseKey ));
309+ block = std::make_shared<CBlock>(setup.CreateBlock ({tx_upreg}, setup.coinbaseKey , chainman. ActiveChainstate () ));
310310 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
311311 BOOST_ASSERT (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params ().GetConsensus (), Consensus::DEPLOYMENT_V19));
312312 ++nHeight;
@@ -326,7 +326,7 @@ void FuncV19Activation(TestChainSetup& setup)
326326 FillableSigningProvider signing_provider;
327327 signing_provider.AddKeyPubKey (collateral_key, collateral_key.GetPubKey ());
328328 BOOST_ASSERT (SignSignature (signing_provider, CTransaction (tx_reg), tx_spend, 0 , SIGHASH_ALL));
329- block = std::make_shared<CBlock>(setup.CreateBlock ({tx_spend}, setup.coinbaseKey ));
329+ block = std::make_shared<CBlock>(setup.CreateBlock ({tx_spend}, setup.coinbaseKey , chainman. ActiveChainstate () ));
330330 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
331331 BOOST_ASSERT (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params ().GetConsensus (), Consensus::DEPLOYMENT_V19));
332332 ++nHeight;
@@ -614,7 +614,7 @@ void FuncTestMempoolReorg(TestChainSetup& setup)
614614 FundTransaction (chainman.ActiveChain (), tx_collateral, utxos, scriptCollateral, dmn_types::Regular.collat_amount , setup.coinbaseKey );
615615 SignTransaction (*(setup.m_node .mempool ), tx_collateral, setup.coinbaseKey );
616616
617- auto block = std::make_shared<CBlock>(setup.CreateBlock ({tx_collateral}, setup.coinbaseKey ));
617+ auto block = std::make_shared<CBlock>(setup.CreateBlock ({tx_collateral}, setup.coinbaseKey , chainman. ActiveChainstate () ));
618618 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
619619 setup.m_node .dmnman ->UpdatedBlockTip (chainman.ActiveChain ().Tip ());
620620 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight + 1 );
@@ -756,7 +756,7 @@ void FuncVerifyDB(TestChainSetup& setup)
756756 FundTransaction (chainman.ActiveChain (), tx_collateral, utxos, scriptCollateral, dmn_types::Regular.collat_amount , setup.coinbaseKey );
757757 SignTransaction (*(setup.m_node .mempool ), tx_collateral, setup.coinbaseKey );
758758
759- auto block = std::make_shared<CBlock>(setup.CreateBlock ({tx_collateral}, setup.coinbaseKey ));
759+ auto block = std::make_shared<CBlock>(setup.CreateBlock ({tx_collateral}, setup.coinbaseKey , chainman. ActiveChainstate () ));
760760 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
761761 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
762762 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight + 1 );
@@ -788,7 +788,7 @@ void FuncVerifyDB(TestChainSetup& setup)
788788
789789 auto tx_reg_hash = tx_reg.GetHash ();
790790
791- block = std::make_shared<CBlock>(setup.CreateBlock ({tx_reg}, setup.coinbaseKey ));
791+ block = std::make_shared<CBlock>(setup.CreateBlock ({tx_reg}, setup.coinbaseKey , chainman. ActiveChainstate () ));
792792 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
793793 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
794794 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight + 2 );
@@ -800,7 +800,7 @@ void FuncVerifyDB(TestChainSetup& setup)
800800 collateral_utxos.emplace (payload.collateralOutpoint , std::make_pair (1 , 1000 ));
801801 auto proUpRevTx = CreateProUpRevTx (chainman.ActiveChain (), *(setup.m_node .mempool ), collateral_utxos, tx_reg_hash, operatorKey, collateralKey);
802802
803- block = std::make_shared<CBlock>(setup.CreateBlock ({proUpRevTx}, setup.coinbaseKey ));
803+ block = std::make_shared<CBlock>(setup.CreateBlock ({proUpRevTx}, setup.coinbaseKey , chainman. ActiveChainstate () ));
804804 BOOST_ASSERT (chainman.ProcessNewBlock (Params (), block, true , nullptr ));
805805 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
806806 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight + 3 );
0 commit comments