mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user