test: drop scriptPubKeyIn arg from CreateNewBlock

This removes the temporary overload added in the previous commit.

Also drop unneeded custom coinbase output scripts.
This commit is contained in:
Sjors Provoost
2024-11-21 15:28:34 +01:00
parent ff41b9e296
commit 52fd1511a7
15 changed files with 85 additions and 62 deletions

View File

@@ -66,7 +66,8 @@ std::shared_ptr<CBlock> MinerTestingSetup::Block(const uint256& prev_hash)
static uint64_t time = Params().GenesisBlock().nTime;
BlockAssembler::Options options;
auto ptemplate = BlockAssembler{m_node.chainman->ActiveChainstate(), m_node.mempool.get(), options}.CreateNewBlock(CScript{} << i++ << OP_TRUE);
options.coinbase_output_script = CScript{} << i++ << OP_TRUE;
auto ptemplate = BlockAssembler{m_node.chainman->ActiveChainstate(), m_node.mempool.get(), options}.CreateNewBlock();
auto pblock = std::make_shared<CBlock>(ptemplate->block);
pblock->hashPrevBlock = prev_hash;
pblock->nTime = ++time;
@@ -331,7 +332,8 @@ BOOST_AUTO_TEST_CASE(witness_commitment_index)
CScript pubKey;
pubKey << 1 << OP_TRUE;
BlockAssembler::Options options;
auto ptemplate = BlockAssembler{m_node.chainman->ActiveChainstate(), m_node.mempool.get(), options}.CreateNewBlock(pubKey);
options.coinbase_output_script = pubKey;
auto ptemplate = BlockAssembler{m_node.chainman->ActiveChainstate(), m_node.mempool.get(), options}.CreateNewBlock();
CBlock pblock = ptemplate->block;
CTxOut witness;