@@ -149,7 +149,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
149149 auto & dmnman = *Assert (m_node.dmnman );
150150 const auto & consensus_params = Params ().GetConsensus ();
151151
152- CScript coinbasePubKey = CScript () << ToByteVector ( coinbaseKey.GetPubKey ()) << OP_CHECKSIG ;
152+ CScript coinbasePubKey = GetScriptForRawPubKey ( coinbaseKey.GetPubKey ());
153153
154154 BOOST_REQUIRE (DeploymentDIP0003Enforced (WITH_LOCK (cs_main, return m_node.chainman ->ActiveChain ().Height ()),
155155 consensus_params));
@@ -160,7 +160,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
160160 auto utxos = BuildSimpleUtxoMap (m_coinbase_txns);
161161 auto tx = CreateProRegTx (m_node.chainman ->ActiveChain (), *m_node.mempool , utxos, 1 , GenerateRandomAddress (), coinbaseKey, ownerKey, operatorKey);
162162
163- CreateAndProcessBlock ({tx}, coinbaseKey );
163+ CreateAndProcessBlock ({tx}, coinbasePubKey );
164164
165165 {
166166 LOCK (cs_main);
@@ -173,7 +173,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
173173 BOOST_CHECK (tip->nHeight < Params ().GetConsensus ().BRRHeight );
174174 }
175175
176- CreateAndProcessBlock ({}, coinbaseKey );
176+ CreateAndProcessBlock ({}, coinbasePubKey );
177177
178178 {
179179 LOCK (cs_main);
@@ -186,12 +186,12 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
186186 const auto pblocktemplate = BlockAssembler (m_node.chainman ->ActiveChainstate (), m_node, m_node.mempool .get (), Params ()).CreateNewBlock (coinbasePubKey);
187187 }
188188 for ([[maybe_unused]] auto _ : irange::range (499 )) {
189- CreateAndProcessBlock ({}, coinbaseKey );
189+ CreateAndProcessBlock ({}, coinbasePubKey );
190190 LOCK (cs_main);
191191 dmnman.UpdatedBlockTip (m_node.chainman ->ActiveChain ().Tip ());
192192 }
193193 BOOST_CHECK (m_node.chainman ->ActiveChain ().Height () < Params ().GetConsensus ().BRRHeight );
194- CreateAndProcessBlock ({}, coinbaseKey );
194+ CreateAndProcessBlock ({}, coinbasePubKey );
195195
196196 {
197197 // Advance to ACTIVE at height = (BRRHeight - 1)
@@ -218,7 +218,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
218218 }
219219
220220 for ([[maybe_unused]] auto _ : irange::range (consensus_params.nSuperblockCycle - 1 )) {
221- CreateAndProcessBlock ({}, coinbaseKey );
221+ CreateAndProcessBlock ({}, coinbasePubKey );
222222 }
223223
224224 {
@@ -237,7 +237,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
237237 for ([[maybe_unused]] auto i : irange::range (19 )) {
238238 for ([[maybe_unused]] auto j : irange::range (3 )) {
239239 for ([[maybe_unused]] auto k : irange::range (consensus_params.nSuperblockCycle )) {
240- CreateAndProcessBlock ({}, coinbaseKey );
240+ CreateAndProcessBlock ({}, coinbasePubKey );
241241 }
242242 LOCK (cs_main);
243243 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
@@ -274,7 +274,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
274274 // check 10 next superblocks
275275 for ([[maybe_unused]] auto i : irange::range (10 )) {
276276 for ([[maybe_unused]] auto k : irange::range (consensus_params.nSuperblockCycle )) {
277- CreateAndProcessBlock ({}, coinbaseKey );
277+ CreateAndProcessBlock ({}, coinbasePubKey );
278278 }
279279 LOCK (cs_main);
280280 const CBlockIndex* const tip{m_node.chainman ->ActiveChain ().Tip ()};
0 commit comments