does_pruning -> is_pruned
This commit is contained in:
parent
1e10445f82
commit
6f850ebdac
@ -382,7 +382,7 @@ impl<V> Client<V> where V: Verifier {
|
||||
let root = HeaderView::new(&header).state_root();
|
||||
// check that the block is not too old -- blocks within `HISTORY` blocks of the best will
|
||||
// always be available. If the block could be too old, check if its state root is valid.
|
||||
if db.does_pruning()
|
||||
if db.is_pruned()
|
||||
&& self.chain.best_block_number() >= block_number + HISTORY
|
||||
&& !db.contains(&root) {
|
||||
return None;
|
||||
|
@ -176,7 +176,7 @@ impl JournalDB for ArchiveDB {
|
||||
self.backing.get_by_prefix(&id.bytes()[0..12]).and_then(|b| Some(b.to_vec()))
|
||||
}
|
||||
|
||||
fn does_pruning(&self) -> bool { false }
|
||||
fn is_pruned(&self) -> bool { false }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -43,6 +43,6 @@ pub trait JournalDB : HashDB + Send + Sync {
|
||||
None
|
||||
}
|
||||
|
||||
/// Whether this database does pruning.
|
||||
fn does_pruning(&self) -> bool { true }
|
||||
/// Whether this database is pruned.
|
||||
fn is_pruned(&self) -> bool { true }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user