Fix benchmark difficulty callsite

This commit is contained in:
Capri 2026-09-16 16:32:48 +00:00
commit d9e20d1590
Signed by: VextaProject
SSH key fingerprint: SHA256:739BZv8LvIDY2tR7lXLy/IQ6MaGTQtYcG9GNvCjmpVM

View file

@ -27,7 +27,11 @@ static void DuplicateInputs(benchmark::Bench& bench)
LOCK(cs_main); LOCK(cs_main);
CBlockIndex* pindexPrev = testing_setup->m_node.chainman->ActiveChain().Tip(); 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(),
ALGO_SHA256D);
block.nNonce = 0; block.nNonce = 0;
auto nHeight = pindexPrev->nHeight + 1; auto nHeight = pindexPrev->nHeight + 1;