@@ -286,7 +286,7 @@ void FuncV19Activation(TestChainSetup& setup)
286286 auto & chainman = *Assert (setup.m_node .chainman .get ());
287287 auto & dmnman = *Assert (setup.m_node .dmnman );
288288
289- BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params () .GetConsensus (), Consensus::DEPLOYMENT_V19));
289+ BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), chainman .GetConsensus (), Consensus::DEPLOYMENT_V19));
290290
291291 // create
292292 auto utxos = BuildSimpleUtxoMap (setup.m_coinbase_txns );
@@ -303,7 +303,7 @@ void FuncV19Activation(TestChainSetup& setup)
303303
304304 auto block = std::make_shared<CBlock>(setup.CreateBlock ({tx_reg}, coinbase_pk, chainman.ActiveChainstate ()));
305305 BOOST_REQUIRE (chainman.ProcessNewBlock (block, true , nullptr ));
306- BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params () .GetConsensus (), Consensus::DEPLOYMENT_V19));
306+ BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), chainman .GetConsensus (), Consensus::DEPLOYMENT_V19));
307307 ++nHeight;
308308 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight);
309309 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
@@ -321,7 +321,7 @@ void FuncV19Activation(TestChainSetup& setup)
321321
322322 block = std::make_shared<CBlock>(setup.CreateBlock ({tx_upreg}, coinbase_pk, chainman.ActiveChainstate ()));
323323 BOOST_REQUIRE (chainman.ProcessNewBlock (block, true , nullptr ));
324- BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params () .GetConsensus (), Consensus::DEPLOYMENT_V19));
324+ BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), chainman .GetConsensus (), Consensus::DEPLOYMENT_V19));
325325 ++nHeight;
326326 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight);
327327 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
@@ -341,7 +341,7 @@ void FuncV19Activation(TestChainSetup& setup)
341341 BOOST_REQUIRE (SignSignature (signing_provider, CTransaction (tx_reg), tx_spend, 0 , SIGHASH_ALL));
342342 block = std::make_shared<CBlock>(setup.CreateBlock ({tx_spend}, coinbase_pk, chainman.ActiveChainstate ()));
343343 BOOST_REQUIRE (chainman.ProcessNewBlock (block, true , nullptr ));
344- BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params () .GetConsensus (), Consensus::DEPLOYMENT_V19));
344+ BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), chainman .GetConsensus (), Consensus::DEPLOYMENT_V19));
345345 ++nHeight;
346346 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight);
347347 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
@@ -353,7 +353,7 @@ void FuncV19Activation(TestChainSetup& setup)
353353
354354 // mine another block so that it's not the last one before V19
355355 setup.CreateAndProcessBlock ({}, coinbase_pk);
356- BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params () .GetConsensus (), Consensus::DEPLOYMENT_V19));
356+ BOOST_REQUIRE (!DeploymentActiveAfter (chainman.ActiveChain ().Tip (), chainman .GetConsensus (), Consensus::DEPLOYMENT_V19));
357357 ++nHeight;
358358 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight);
359359 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
@@ -365,7 +365,7 @@ void FuncV19Activation(TestChainSetup& setup)
365365
366366 // this block should activate V19
367367 setup.CreateAndProcessBlock ({}, coinbase_pk);
368- BOOST_REQUIRE (DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params () .GetConsensus (), Consensus::DEPLOYMENT_V19));
368+ BOOST_REQUIRE (DeploymentActiveAfter (chainman.ActiveChain ().Tip (), chainman .GetConsensus (), Consensus::DEPLOYMENT_V19));
369369 ++nHeight;
370370 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight);
371371 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
@@ -387,7 +387,7 @@ void FuncV19Activation(TestChainSetup& setup)
387387 {
388388 setup.CreateAndProcessBlock ({}, coinbase_pk);
389389 BOOST_REQUIRE (
390- DeploymentActiveAfter (chainman.ActiveChain ().Tip (), Params () .GetConsensus (), Consensus::DEPLOYMENT_V19));
390+ DeploymentActiveAfter (chainman.ActiveChain ().Tip (), chainman .GetConsensus (), Consensus::DEPLOYMENT_V19));
391391 BOOST_CHECK_EQUAL (chainman.ActiveChain ().Height (), nHeight + 1 + i);
392392 dmnman.UpdatedBlockTip (chainman.ActiveChain ().Tip ());
393393 dmnman.DoMaintenance ();
@@ -965,10 +965,9 @@ struct TestChainV19Setup : public TestChainV19BeforeActivationSetup {
965965 for (int i = 0 ; i < 5 ; ++i) {
966966 CreateAndProcessBlock ({}, coinbase_pk);
967967 }
968- bool v19_just_activated{DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), Params ().GetConsensus (),
969- Consensus::DEPLOYMENT_V19) &&
970- !DeploymentActiveAt (*m_node.chainman ->ActiveChain ().Tip (), Params ().GetConsensus (),
971- Consensus::DEPLOYMENT_V19)};
968+ bool v19_just_activated{
969+ DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), m_node.chainman ->GetConsensus (), Consensus::DEPLOYMENT_V19) &&
970+ !DeploymentActiveAt (*m_node.chainman ->ActiveChain ().Tip (), m_node.chainman ->GetConsensus (), Consensus::DEPLOYMENT_V19)};
972971 assert (v19_just_activated);
973972 }
974973};
@@ -977,7 +976,7 @@ struct TestChainV19Setup : public TestChainV19BeforeActivationSetup {
977976TestChainV19BeforeActivationSetup::TestChainV19BeforeActivationSetup () :
978977 TestChainSetup(494 , CBaseChainParams::REGTEST, {" -testactivationheight=v19@500" , " -testactivationheight=v20@500" , " -testactivationheight=mn_rr@500" })
979978{
980- bool v19_active{DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), Params (). GetConsensus (),
979+ bool v19_active{DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), m_node. chainman -> GetConsensus (),
981980 Consensus::DEPLOYMENT_V19)};
982981 assert (!v19_active);
983982}
0 commit comments