Require CBlockIndex::GetBlockPos() to hold mutex cs_main

This commit is contained in:
Jon Atack
2021-09-09 17:17:39 +02:00
parent 39d9bbe4ac
commit 6fd4341c10
5 changed files with 33 additions and 17 deletions

View File

@@ -13,6 +13,8 @@ using node::UndoReadFromDisk;
bool ComputeFilter(BlockFilterType filter_type, const CBlockIndex* block_index, BlockFilter& filter)
{
LOCK(::cs_main);
CBlock block;
if (!ReadBlockFromDisk(block, block_index->GetBlockPos(), Params().GetConsensus())) {
return false;