Changeset View
Changeset View
Standalone View
Standalone View
src/node/blockstorage.cpp
| Show First 20 Lines • Show All 455 Lines • ▼ Show 20 Lines | for (const MapCheckpoints::value_type &i : reverse_iterate(checkpoints)) { | ||||
| if (pindex) { | if (pindex) { | ||||
| return pindex; | return pindex; | ||||
| } | } | ||||
| } | } | ||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| bool BlockManager::IsBlockPruned(const CBlockIndex *pblockindex) { | bool BlockManager::IsBlockPruned(const CBlockIndex &block) const { | ||||
| AssertLockHeld(::cs_main); | AssertLockHeld(::cs_main); | ||||
| return (m_have_pruned && !pblockindex->nStatus.hasData() && | return (m_have_pruned && !block.nStatus.hasData() && block.nTx > 0); | ||||
| pblockindex->nTx > 0); | |||||
| } | } | ||||
| const CBlockIndex * | const CBlockIndex * | ||||
| BlockManager::GetFirstBlock(const CBlockIndex &upper_block, | BlockManager::GetFirstBlock(const CBlockIndex &upper_block, | ||||
| std::function<bool(BlockStatus)> status_test, | std::function<bool(BlockStatus)> status_test, | ||||
| const CBlockIndex *lower_block) const { | const CBlockIndex *lower_block) const { | ||||
| AssertLockHeld(::cs_main); | AssertLockHeld(::cs_main); | ||||
| const CBlockIndex *last_block = &upper_block; | const CBlockIndex *last_block = &upper_block; | ||||
| ▲ Show 20 Lines • Show All 738 Lines • Show Last 20 Lines | |||||