does_pruning -> is_pruned

This commit is contained in:
Robert Habermeier 2016-06-03 12:10:10 +02:00
parent 1e10445f82
commit 6f850ebdac
3 changed files with 4 additions and 4 deletions

View File

@ -382,7 +382,7 @@ impl<V> Client<V> where V: Verifier {
let root = HeaderView::new(&header).state_root(); let root = HeaderView::new(&header).state_root();
// check that the block is not too old -- blocks within `HISTORY` blocks of the best will // 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. // 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 && self.chain.best_block_number() >= block_number + HISTORY
&& !db.contains(&root) { && !db.contains(&root) {
return None; return None;

View File

@ -176,7 +176,7 @@ impl JournalDB for ArchiveDB {
self.backing.get_by_prefix(&id.bytes()[0..12]).and_then(|b| Some(b.to_vec())) 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)] #[cfg(test)]

View File

@ -43,6 +43,6 @@ pub trait JournalDB : HashDB + Send + Sync {
None None
} }
/// Whether this database does pruning. /// Whether this database is pruned.
fn does_pruning(&self) -> bool { true } fn is_pruned(&self) -> bool { true }
} }