mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-18 03:27:41 +02:00
test: Add util to mine invalid blocks
With the current utils it is only possible to mine valid blocks. This commit adds new util methods to mine invalid blocks.
This commit is contained in:
@@ -27,7 +27,7 @@ static void AssembleBlock(benchmark::Bench& bench)
|
||||
std::array<CTransactionRef, NUM_BLOCKS - COINBASE_MATURITY + 1> txs;
|
||||
for (size_t b{0}; b < NUM_BLOCKS; ++b) {
|
||||
CMutableTransaction tx;
|
||||
tx.vin.push_back(MineBlock(test_setup->m_node, P2WSH_OP_TRUE));
|
||||
tx.vin.push_back(CTxIn{MineBlock(test_setup->m_node, P2WSH_OP_TRUE)});
|
||||
tx.vin.back().scriptWitness = witness;
|
||||
tx.vout.emplace_back(1337, P2WSH_OP_TRUE);
|
||||
if (NUM_BLOCKS - b >= COINBASE_MATURITY)
|
||||
|
||||
Reference in New Issue
Block a user