Pruning changes tries (#856)

* changes trie pruning

* add comment

* do not prune changes tries on archive nodes
This commit is contained in:
Svyatoslav Nikolsky
2018-10-17 11:08:45 +03:00
committed by Gav Wood
parent 8bc5242c92
commit 9886d12c26
10 changed files with 536 additions and 44 deletions
+9
View File
@@ -142,6 +142,15 @@ impl PruningMode {
max_mem: None,
})
}
/// Is this an archive (either ArchiveAll or ArchiveCanonical) pruning mode?
pub fn is_archive(&self) -> bool {
match *self {
PruningMode::ArchiveAll | PruningMode::ArchiveCanonical => true,
PruningMode::Constrained(_) => false
}
}
}
impl Default for PruningMode {