aboutsummaryrefslogtreecommitdiff
path: root/src/bench/block_assemble.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-09 11:47:32 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-17 10:19:32 -0400
commitfab117096446ab63d1f38c1ef6edbc94a5d4ab52 (patch)
tree4a3e6d3eabb3c6990751f5a9b9f0100a6e27d1ee /src/bench/block_assemble.cpp
parent54f812d9d29893c690ae06b84aaeab128186aa36 (diff)
bench: Remove requirement that all benches use RegTestingSetup
Diffstat (limited to 'src/bench/block_assemble.cpp')
-rw-r--r--src/bench/block_assemble.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp
index a113a73828..594ca4967d 100644
--- a/src/bench/block_assemble.cpp
+++ b/src/bench/block_assemble.cpp
@@ -16,6 +16,7 @@
static void AssembleBlock(benchmark::State& state)
{
+ RegTestingSetup test_setup;
const std::vector<unsigned char> op_true{OP_TRUE};
CScriptWitness witness;
witness.stack.push_back(op_true);
@@ -30,7 +31,7 @@ static void AssembleBlock(benchmark::State& state)
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(g_testing_setup->m_node, SCRIPT_PUB));
+ tx.vin.push_back(MineBlock(test_setup.m_node, SCRIPT_PUB));
tx.vin.back().scriptWitness = witness;
tx.vout.emplace_back(1337, SCRIPT_PUB);
if (NUM_BLOCKS - b >= COINBASE_MATURITY)
@@ -47,7 +48,7 @@ static void AssembleBlock(benchmark::State& state)
}
while (state.KeepRunning()) {
- PrepareBlock(g_testing_setup->m_node, SCRIPT_PUB);
+ PrepareBlock(test_setup.m_node, SCRIPT_PUB);
}
}