@@ -210,7 +210,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
210210 // next block should be signaling by default
211211 LOCK (cs_main);
212212 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
213- const bool isV20Active{DeploymentActiveAfter (tip, consensus_params , Consensus::DEPLOYMENT_V20)};
213+ const bool isV20Active{DeploymentActiveAfter (tip, *m_node. chainman , Consensus::DEPLOYMENT_V20)};
214214 dmnman.UpdatedBlockTip (tip);
215215 BOOST_REQUIRE (dmnman.GetListAtChainTip ().HasMN (tx.GetHash ()));
216216 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
@@ -226,7 +226,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
226226 {
227227 LOCK (cs_main);
228228 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
229- const bool isV20Active{DeploymentActiveAfter (tip, consensus_params , Consensus::DEPLOYMENT_V20)};
229+ const bool isV20Active{DeploymentActiveAfter (tip, *m_node. chainman , Consensus::DEPLOYMENT_V20)};
230230 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
231231 const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, isV20Active);
232232 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
@@ -243,20 +243,20 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
243243 }
244244 LOCK (cs_main);
245245 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
246- const bool isV20Active{DeploymentActiveAfter (tip, consensus_params , Consensus::DEPLOYMENT_V20)};
246+ const bool isV20Active{DeploymentActiveAfter (tip, *m_node. chainman , Consensus::DEPLOYMENT_V20)};
247247 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
248248 const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, isV20Active);
249249 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
250250 BOOST_CHECK_EQUAL (pblocktemplate->voutMasternodePayments [0 ].nValue , masternode_payment);
251251 }
252252 }
253- BOOST_CHECK (DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), consensus_params , Consensus::DEPLOYMENT_V20));
253+ BOOST_CHECK (DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), *m_node. chainman , Consensus::DEPLOYMENT_V20));
254254 // Allocation of block subsidy is 60% MN, 20% miners and 20% treasury
255255 {
256256 // Reward split should reach ~75/25 after reallocation is done
257257 LOCK (cs_main);
258258 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
259- const bool isV20Active{DeploymentActiveAfter (tip, consensus_params , Consensus::DEPLOYMENT_V20)};
259+ const bool isV20Active{DeploymentActiveAfter (tip, *m_node. chainman , Consensus::DEPLOYMENT_V20)};
260260 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
261261 const CAmount block_subsidy_sb = GetSuperblockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
262262 CAmount block_subsidy_potential = block_subsidy + block_subsidy_sb;
@@ -270,7 +270,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
270270 BOOST_CHECK_EQUAL (pblocktemplate->voutMasternodePayments [0 ].nValue , masternode_payment);
271271 BOOST_CHECK_EQUAL (pblocktemplate->voutMasternodePayments [0 ].nValue , 106300596 ); // 0.75
272272 }
273- BOOST_CHECK (!DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), consensus_params , Consensus::DEPLOYMENT_MN_RR));
273+ BOOST_CHECK (!DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), *m_node. chainman , Consensus::DEPLOYMENT_MN_RR));
274274
275275 // Reward split should stay ~75/25 after reallocation is done,
276276 // check 10 next superblocks
@@ -280,8 +280,8 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
280280 }
281281 LOCK (cs_main);
282282 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
283- const bool isV20Active{DeploymentActiveAfter (tip, consensus_params , Consensus::DEPLOYMENT_V20)};
284- const bool isMNRewardReallocated{DeploymentActiveAfter (tip, consensus_params , Consensus::DEPLOYMENT_MN_RR)};
283+ const bool isV20Active{DeploymentActiveAfter (tip, *m_node. chainman , Consensus::DEPLOYMENT_V20)};
284+ const bool isMNRewardReallocated{DeploymentActiveAfter (tip, *m_node. chainman , Consensus::DEPLOYMENT_MN_RR)};
285285 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
286286 CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, isV20Active);
287287 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
@@ -295,12 +295,12 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
295295 BOOST_CHECK_EQUAL (pblocktemplate->voutMasternodePayments [payment_index].nValue , masternode_payment);
296296 }
297297
298- BOOST_CHECK (DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), consensus_params , Consensus::DEPLOYMENT_MN_RR));
298+ BOOST_CHECK (DeploymentActiveAfter (m_node.chainman ->ActiveChain ().Tip (), *m_node. chainman , Consensus::DEPLOYMENT_MN_RR));
299299 { // At this moment Masternode reward should be reallocated to platform
300300 // Allocation of block subsidy is 60% MN, 20% miners and 20% treasury
301301 LOCK (cs_main);
302302 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
303- const bool isV20Active{DeploymentActiveAfter (tip, consensus_params , Consensus::DEPLOYMENT_V20)};
303+ const bool isV20Active{DeploymentActiveAfter (tip, *m_node. chainman , Consensus::DEPLOYMENT_V20)};
304304 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
305305 const CAmount block_subsidy_sb = GetSuperblockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
306306 CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, isV20Active);
0 commit comments