mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Move ::fPruneMode into BlockManager
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
namespace node {
|
||||
std::atomic_bool fImporting(false);
|
||||
std::atomic_bool fReindex(false);
|
||||
bool fPruneMode = false;
|
||||
|
||||
bool CBlockIndexWorkComparator::operator()(const CBlockIndex* pa, const CBlockIndex* pb) const
|
||||
{
|
||||
@@ -153,7 +152,7 @@ void BlockManager::PruneOneBlockFile(const int fileNumber)
|
||||
|
||||
void BlockManager::FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight, int chain_tip_height)
|
||||
{
|
||||
assert(fPruneMode && nManualPruneHeight > 0);
|
||||
assert(IsPruneMode() && nManualPruneHeight > 0);
|
||||
|
||||
LOCK2(cs_main, cs_LastBlockFile);
|
||||
if (chain_tip_height < 0) {
|
||||
@@ -656,7 +655,7 @@ bool BlockManager::FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigne
|
||||
if (out_of_space) {
|
||||
return AbortNode("Disk space is too low!", _("Disk space is too low!"));
|
||||
}
|
||||
if (bytes_allocated != 0 && fPruneMode) {
|
||||
if (bytes_allocated != 0 && IsPruneMode()) {
|
||||
m_check_for_pruning = true;
|
||||
}
|
||||
}
|
||||
@@ -680,7 +679,7 @@ bool BlockManager::FindUndoPos(BlockValidationState& state, int nFile, FlatFileP
|
||||
if (out_of_space) {
|
||||
return AbortNode(state, "Disk space is too low!", _("Disk space is too low!"));
|
||||
}
|
||||
if (bytes_allocated != 0 && fPruneMode) {
|
||||
if (bytes_allocated != 0 && IsPruneMode()) {
|
||||
m_check_for_pruning = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user