mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 10:42:23 +02:00
refactor: add a function for determining if a block is pruned or not
This commit is contained in:
@ -497,4 +497,10 @@ bool DumpMempool();
|
||||
/** Load the mempool from disk. */
|
||||
bool LoadMempool();
|
||||
|
||||
//! Check whether the block associated with this index entry is pruned or not.
|
||||
inline bool IsBlockPruned(const CBlockIndex* pblockindex)
|
||||
{
|
||||
return (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0);
|
||||
}
|
||||
|
||||
#endif // BITCOIN_VALIDATION_H
|
||||
|
Reference in New Issue
Block a user