Skip to content

Commit 91226eb

Browse files
committed
bench: Use existing NodeContext in DuplicateInputs
1 parent e6b4aa6 commit 91226eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bench/duplicate_inputs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ static void DuplicateInputs(benchmark::Bench& bench)
2525
CMutableTransaction naughtyTx{};
2626

2727
LOCK(cs_main);
28-
CBlockIndex* pindexPrev = ::ChainActive().Tip();
28+
assert(std::addressof(::ChainActive()) == std::addressof(testing_setup->m_node.chainman->ActiveChain()));
29+
CBlockIndex* pindexPrev = testing_setup->m_node.chainman->ActiveChain().Tip();
2930
assert(pindexPrev != nullptr);
3031
block.nBits = GetNextWorkRequired(pindexPrev, &block, chainparams.GetConsensus());
3132
block.nNonce = 0;

0 commit comments

Comments
 (0)