mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Add BlockManager::IsPruneMode()
This commit is contained in:
@@ -48,8 +48,6 @@ static constexpr size_t BLOCK_SERIALIZATION_HEADER_SIZE = CMessageHeader::MESSAG
|
||||
|
||||
extern std::atomic_bool fImporting;
|
||||
extern std::atomic_bool fReindex;
|
||||
/** Pruning-related variables and constants */
|
||||
/** True if we're running in -prune mode. */
|
||||
extern bool fPruneMode;
|
||||
extern uint64_t nPruneTarget;
|
||||
|
||||
@@ -175,6 +173,9 @@ public:
|
||||
/** Store block on disk. If dbp is not nullptr, then it provides the known position of the block within a block file on disk. */
|
||||
FlatFilePos SaveBlockToDisk(const CBlock& block, int nHeight, CChain& active_chain, const CChainParams& chainparams, const FlatFilePos* dbp);
|
||||
|
||||
/** Whether running in -prune mode. */
|
||||
[[nodiscard]] bool IsPruneMode() const { return fPruneMode; }
|
||||
|
||||
/** Attempt to stay below this number of bytes of block files. */
|
||||
[[nodiscard]] uint64_t GetPruneTarget() const { return nPruneTarget; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user