validation: Make PruneOneBlockFile() a member of ChainstateManager

This commit is contained in:
MarcoFalke
2020-04-18 09:14:29 -04:00
parent fa84b1cd84
commit fa24d49098
3 changed files with 19 additions and 21 deletions

View File

@@ -214,11 +214,6 @@ double GuessVerificationProgress(const ChainTxData& data, const CBlockIndex* pin
/** Calculate the amount of disk space the block & undo files currently use */
uint64_t CalculateCurrentUsage();
/**
* Mark one block file as pruned.
*/
void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
/**
* Actually unlink the specified files
*/
@@ -865,6 +860,9 @@ public:
CChain& ValidatedChain() const { return ValidatedChainstate().m_chain; }
CBlockIndex* ValidatedTip() const { return ValidatedChain().Tip(); }
//! Mark one block file as pruned (modify associated database entries)
void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
//! Load the block tree and coins database from disk, initializing state if we're running with -reindex
bool LoadBlockIndex(const CChainParams& chainparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main);