mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Move ::fPruneMode into BlockManager
This commit is contained in:
parent
fa721f1cab
commit
fa177d7b6b
4 changed files with 9 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue