@@ -214,7 +214,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
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);
217- const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, era);
217+ const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, consensus_params, era);
218218 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
219219 BOOST_CHECK_EQUAL (pblocktemplate->voutMasternodePayments [0 ].nValue , masternode_payment);
220220 }
@@ -229,7 +229,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
229229 const MnRewardEra era{GetMnRewardEraAfter (tip, *m_node.chainman )};
230230 const bool isV20Active{era != MnRewardEra::Classic};
231231 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
232- const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, era);
232+ const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, consensus_params, era);
233233 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
234234 BOOST_CHECK_EQUAL (pblocktemplate->block .vtx [0 ]->GetValueOut (), 28847249686 );
235235 BOOST_CHECK_EQUAL (pblocktemplate->voutMasternodePayments [0 ].nValue , masternode_payment);
@@ -247,7 +247,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
247247 const MnRewardEra era{GetMnRewardEraAfter (tip, *m_node.chainman )};
248248 const bool isV20Active{era != MnRewardEra::Classic};
249249 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
250- const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, era);
250+ const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, consensus_params, era);
251251 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
252252 BOOST_CHECK_EQUAL (pblocktemplate->voutMasternodePayments [0 ].nValue , masternode_payment);
253253 }
@@ -266,7 +266,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
266266 BOOST_CHECK_EQUAL (block_subsidy_potential, 177167660 );
267267 CAmount expected_block_reward = block_subsidy_potential - block_subsidy_potential / 5 ;
268268
269- const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, era);
269+ const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, consensus_params, era);
270270 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
271271 BOOST_CHECK_EQUAL (pblocktemplate->block .vtx [0 ]->GetValueOut (), expected_block_reward);
272272 BOOST_CHECK_EQUAL (pblocktemplate->block .vtx [0 ]->GetValueOut (), 141734128 );
@@ -287,7 +287,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
287287 const bool isV20Active{era != MnRewardEra::Classic};
288288 const bool isMNRewardReallocated{era == MnRewardEra::EvoReward};
289289 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
290- CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, era);
290+ CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, consensus_params, era);
291291 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
292292
293293 if (isMNRewardReallocated) {
@@ -308,7 +308,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
308308 const bool isV20Active{era != MnRewardEra::Classic};
309309 const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
310310 const CAmount block_subsidy_sb = GetSuperblockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
311- CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, era);
311+ CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, consensus_params, era);
312312 const CAmount platform_payment = PlatformShare (masternode_payment);
313313 masternode_payment -= platform_payment;
314314 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
0 commit comments