Do not call global Params() when chainman is in scope

This commit is contained in:
MacroFake
2022-05-18 18:36:31 +02:00
parent fa30234be8
commit fa1b76aeb0
10 changed files with 28 additions and 34 deletions

View File

@@ -305,7 +305,7 @@ static bool rest_block(const std::any& context,
if (chainman.m_blockman.IsBlockPruned(pblockindex))
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not available (pruned data)");
if (!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
if (!ReadBlockFromDisk(block, pblockindex, chainman.GetParams().GetConsensus()))
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
}