mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
bench: Use existing NodeContext in DuplicateInputs
This commit is contained in:
parent
e6b4aa6eb5
commit
91226eb917
1 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,8 @@ static void DuplicateInputs(benchmark::Bench& bench)
|
|||
CMutableTransaction naughtyTx{};
|
||||
|
||||
LOCK(cs_main);
|
||||
CBlockIndex* pindexPrev = ::ChainActive().Tip();
|
||||
assert(std::addressof(::ChainActive()) == std::addressof(testing_setup->m_node.chainman->ActiveChain()));
|
||||
CBlockIndex* pindexPrev = testing_setup->m_node.chainman->ActiveChain().Tip();
|
||||
assert(pindexPrev != nullptr);
|
||||
block.nBits = GetNextWorkRequired(pindexPrev, &block, chainparams.GetConsensus());
|
||||
block.nNonce = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue