mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#13806: Fix bench/block_assemble assert failure
This commit is contained in:
parent
a86b67d040
commit
f71a9e586e
@ -97,10 +97,14 @@ static void AssembleBlock(benchmark::Bench& bench)
|
||||
if (NUM_BLOCKS - b >= COINBASE_MATURITY)
|
||||
txs.at(b) = MakeTransactionRef(tx);
|
||||
}
|
||||
for (const auto& txr : txs) {
|
||||
CValidationState state;
|
||||
bool ret{::AcceptToMemoryPool(::mempool, state, txr, nullptr /* pfMissingInputs */, false /* bypass_limits */, /* nAbsurdFee */ 0)};
|
||||
assert(ret);
|
||||
{
|
||||
LOCK(::cs_main); // Required for ::AcceptToMemoryPool.
|
||||
|
||||
for (const auto& txr : txs) {
|
||||
CValidationState state;
|
||||
bool ret{::AcceptToMemoryPool(::mempool, state, txr, nullptr /* pfMissingInputs */, false /* bypass_limits */, /* nAbsurdFee */ 0)};
|
||||
assert(ret);
|
||||
}
|
||||
}
|
||||
|
||||
bench.minEpochIterations(700).run([&] {
|
||||
|
Loading…
Reference in New Issue
Block a user