From e507a51323088541c901d477c6a75df414662b03 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sun, 13 Oct 2024 16:19:57 +0000 Subject: [PATCH] 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. --- src/bench/block_assemble.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp index 56afa0132f..2d2c7c97ac 100644 --- a/src/bench/block_assemble.cpp +++ b/src/bench/block_assemble.cpp @@ -32,7 +32,7 @@ static void AssembleBlock(benchmark::Bench& bench) std::array 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); }); }