mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
rest: reduce LOCK(cs_main) scope in rest_block
This commit is contained in:
@@ -305,7 +305,9 @@ 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, chainman.GetParams().GetConsensus()))
|
||||
}
|
||||
|
||||
if (!ReadBlockFromDisk(block, pblockindex, chainman.GetParams().GetConsensus())) {
|
||||
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user