Changeset View
Changeset View
Standalone View
Standalone View
src/bench/block_assemble.cpp
Show All 38 Lines | static void AssembleBlock(benchmark::State &state) { | ||||
{ | { | ||||
// Required for ::AcceptToMemoryPool. | // Required for ::AcceptToMemoryPool. | ||||
LOCK(::cs_main); | LOCK(::cs_main); | ||||
for (const auto &txr : txs) { | for (const auto &txr : txs) { | ||||
CValidationState vstate; | CValidationState vstate; | ||||
bool ret{::AcceptToMemoryPool(config, ::g_mempool, vstate, txr, | bool ret{::AcceptToMemoryPool(config, ::g_mempool, vstate, txr, | ||||
nullptr /* pfMissingInputs */, | |||||
false /* bypass_limits */, | false /* bypass_limits */, | ||||
/* nAbsurdFee */ Amount::zero())}; | /* nAbsurdFee */ Amount::zero())}; | ||||
assert(ret); | assert(ret); | ||||
} | } | ||||
} | } | ||||
while (state.KeepRunning()) { | while (state.KeepRunning()) { | ||||
PrepareBlock(config, SCRIPT_PUB); | PrepareBlock(config, SCRIPT_PUB); | ||||
} | } | ||||
} | } | ||||
BENCHMARK(AssembleBlock, 700); | BENCHMARK(AssembleBlock, 700); |