message: bench: Remove duplicate constants
diff: #include <consensus/validation.h>
  #include <crypto/sha256.h>
  #include <test/util/mining.h>
  +#include <test/util/script.h>
  #include <test/util/setup_common.h>
  #include <test/util/wallet.h>
  #include <txmempool.h>
  @@ -19,14 +20,8 @@ static void AssembleBlock(benchmark::Bench& bench)
  {
  const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
  - const std::vector<unsigned char> op_true{OP_TRUE};
  CScriptWitness witness;
  - witness.stack.push_back(op_true);
  -
  - uint256 witness_program;
  - CSHA256().Write(&op_true[0], op_true.size()).Finalize(witness_program.begin());
  -
  - const CScript SCRIPT_PUB{CScript(OP_0) << std::vector<unsigned char>{witness_program.begin(), witness_program.end()}};
  + witness.stack.push_back(WITNESS_STACK_ELEM_OP_TRUE);
  // Collect some loose transactions that spend the coinbases of our mined blocks
  constexpr size_t NUM_BLOCKS{200};
  @@ -34,9 +29,9 @@ static void AssembleBlock(benchmark::Bench& bench)
  txs.reserve(NUM_BLOCKS - ::Params().GetConsensus().nCoinbaseMaturity + 1);
  for (size_t b{0}; b < NUM_BLOCKS; ++b) {
  CMutableTransaction tx;
  - tx.vin.push_back(MineBlock(test_setup->m_node, SCRIPT_PUB));
  + tx.vin.push_back(MineBlock(test_setup->m_node, P2WSH_OP_TRUE));
  tx.vin.back().scriptWitness = witness;
  - tx.vout.emplace_back(1337, SCRIPT_PUB);
  + tx.vout.emplace_back(1337, P2WSH_OP_TRUE);
  if (NUM_BLOCKS - b >= ::Params().GetConsensus().nCoinbaseMaturity)
  txs.at(b) = MakeTransactionRef(tx);
  }
  @@ -50,7 +45,7 @@ static void AssembleBlock(benchmark::Bench& bench)
  }
  bench.run([&] {
  - PrepareBlock(test_setup->m_node, SCRIPT_PUB);
  + PrepareBlock(test_setup->m_node, P2WSH_OP_TRUE);
  });
  }
  