fix: avoid mandatory-script-verify-flag-failed crash in bench test

Aberrant behaviour was first introduced in 5d10b413 (dash#6152), changes
meant for SegWit made it in, reverting them fixes the problem.
This commit is contained in:
Kittywhiskers Van Gogh 2024-10-13 16:19:57 +00:00
parent a86109a017
commit e507a51323
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -32,7 +32,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, P2SH_OP_TRUE));
tx.vin.push_back(MineBlock(test_setup->m_node, SCRIPT_PUB));
tx.vin.back().scriptSig = scriptSig;
tx.vout.emplace_back(1337, SCRIPT_PUB);
if (NUM_BLOCKS - b >= COINBASE_MATURITY)
@ -48,7 +48,7 @@ static void AssembleBlock(benchmark::Bench& bench)
}
bench.minEpochIterations(700).run([&] {
PrepareBlock(test_setup->m_node, P2SH_OP_TRUE);
PrepareBlock(test_setup->m_node, SCRIPT_PUB);
});
}