@@ -146,6 +146,7 @@ BOOST_AUTO_TEST_SUITE(block_reward_reallocation_tests)
146
146
147
147
BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationSetup)
148
148
{
149
+ auto & dmnman = *Assert (m_node.dmnman );
149
150
const auto & consensus_params = Params ().GetConsensus ();
150
151
151
152
CScript coinbasePubKey = CScript () << ToByteVector (coinbaseKey.GetPubKey ()) << OP_CHECKSIG;
@@ -163,9 +164,9 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
163
164
{
164
165
LOCK (cs_main);
165
166
const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
166
- deterministicMNManager-> UpdatedBlockTip (tip);
167
+ dmnman. UpdatedBlockTip (tip);
167
168
168
- BOOST_ASSERT (deterministicMNManager-> GetListAtChainTip ().HasMN (tx.GetHash ()));
169
+ BOOST_ASSERT (dmnman. GetListAtChainTip ().HasMN (tx.GetHash ()));
169
170
170
171
BOOST_CHECK_EQUAL (tip->nHeight , 498 );
171
172
BOOST_CHECK (tip->nHeight < Params ().GetConsensus ().BRRHeight );
@@ -177,16 +178,16 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
177
178
LOCK (cs_main);
178
179
const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
179
180
BOOST_CHECK_EQUAL (tip->nHeight , 499 );
180
- deterministicMNManager-> UpdatedBlockTip (tip);
181
- BOOST_ASSERT (deterministicMNManager-> GetListAtChainTip ().HasMN (tx.GetHash ()));
181
+ dmnman. UpdatedBlockTip (tip);
182
+ BOOST_ASSERT (dmnman. GetListAtChainTip ().HasMN (tx.GetHash ()));
182
183
BOOST_CHECK (tip->nHeight < Params ().GetConsensus ().BRRHeight );
183
184
// Creating blocks by different ways
184
185
const auto pblocktemplate = BlockAssembler (*sporkManager, *governance, *m_node.llmq_ctx , *m_node.evodb , m_node.chainman ->ActiveChainstate (), *m_node.mempool , Params ()).CreateNewBlock (coinbasePubKey);
185
186
}
186
187
for ([[maybe_unused]] auto _ : irange::range (1999 )) {
187
188
CreateAndProcessBlock ({}, coinbaseKey);
188
189
LOCK (cs_main);
189
- deterministicMNManager-> UpdatedBlockTip (m_node.chainman ->ActiveChain ().Tip ());
190
+ dmnman. UpdatedBlockTip (m_node.chainman ->ActiveChain ().Tip ());
190
191
}
191
192
BOOST_CHECK (m_node.chainman ->ActiveChain ().Height () < Params ().GetConsensus ().BRRHeight );
192
193
CreateAndProcessBlock ({}, coinbaseKey);
@@ -196,8 +197,8 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
196
197
LOCK (cs_main);
197
198
const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
198
199
BOOST_CHECK_EQUAL (tip->nHeight , Params ().GetConsensus ().BRRHeight - 1 );
199
- deterministicMNManager-> UpdatedBlockTip (tip);
200
- BOOST_ASSERT (deterministicMNManager-> GetListAtChainTip ().HasMN (tx.GetHash ()));
200
+ dmnman. UpdatedBlockTip (tip);
201
+ BOOST_ASSERT (dmnman. GetListAtChainTip ().HasMN (tx.GetHash ()));
201
202
}
202
203
203
204
{
@@ -207,8 +208,8 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
207
208
LOCK (cs_main);
208
209
const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
209
210
const bool isV20Active{DeploymentActiveAfter (tip, consensus_params, Consensus::DEPLOYMENT_V20)};
210
- deterministicMNManager-> UpdatedBlockTip (tip);
211
- BOOST_ASSERT (deterministicMNManager-> GetListAtChainTip ().HasMN (tx.GetHash ()));
211
+ dmnman. UpdatedBlockTip (tip);
212
+ BOOST_ASSERT (dmnman. GetListAtChainTip ().HasMN (tx.GetHash ()));
212
213
const CAmount block_subsidy = GetBlockSubsidyInner (tip->nBits , tip->nHeight , consensus_params, isV20Active);
213
214
const CAmount masternode_payment = GetMasternodePayment (tip->nHeight , block_subsidy, isV20Active);
214
215
const auto pblocktemplate = BlockAssembler (*sporkManager, *governance, *m_node.llmq_ctx , *m_node.evodb , m_node.chainman ->ActiveChainstate (), *m_node.mempool , Params ()).CreateNewBlock (coinbasePubKey);
0 commit comments