Merge 194b414697 into merged_master (Bitcoin PR bitcoin/bitcoin#25016)

This commit is contained in:
James Dorfman 2024-08-08 17:30:27 +00:00
commit 387cfbcfe8
4 changed files with 13 additions and 12 deletions

View file

@ -406,10 +406,10 @@ bool BlockManager::IsBlockPruned(const CBlockIndex* pblockindex)
return (m_have_pruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0);
}
const CBlockIndex* GetFirstStoredBlock(const CBlockIndex* start_block) {
const CBlockIndex* BlockManager::GetFirstStoredBlock(const CBlockIndex& start_block)
{
AssertLockHeld(::cs_main);
assert(start_block);
const CBlockIndex* last_block = start_block;
const CBlockIndex* last_block = &start_block;
while (last_block->pprev && (last_block->pprev->nStatus & BLOCK_HAVE_DATA)) {
last_block = last_block->pprev;
}