mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 16:42:54 +01:00
bench: Use existing NodeContext in DuplicateInputs
This commit is contained in:
@@ -25,7 +25,8 @@ static void DuplicateInputs(benchmark::Bench& bench)
|
|||||||
CMutableTransaction naughtyTx{};
|
CMutableTransaction naughtyTx{};
|
||||||
|
|
||||||
LOCK(cs_main);
|
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);
|
assert(pindexPrev != nullptr);
|
||||||
block.nBits = GetNextWorkRequired(pindexPrev, &block, chainparams.GetConsensus());
|
block.nBits = GetNextWorkRequired(pindexPrev, &block, chainparams.GetConsensus());
|
||||||
block.nNonce = 0;
|
block.nNonce = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user