From 6f850ebdacf6b7b68dac093b558a90d886e91c7e Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Fri, 3 Jun 2016 12:10:10 +0200 Subject: [PATCH] does_pruning -> is_pruned --- ethcore/src/client/client.rs | 2 +- util/src/journaldb/archivedb.rs | 2 +- util/src/journaldb/traits.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 9fbe8ae2d..f74fb33f5 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -382,7 +382,7 @@ impl Client 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; diff --git a/util/src/journaldb/archivedb.rs b/util/src/journaldb/archivedb.rs index c79bab23e..c6acc1280 100644 --- a/util/src/journaldb/archivedb.rs +++ b/util/src/journaldb/archivedb.rs @@ -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)] diff --git a/util/src/journaldb/traits.rs b/util/src/journaldb/traits.rs index d41077655..74149b062 100644 --- a/util/src/journaldb/traits.rs +++ b/util/src/journaldb/traits.rs @@ -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 } }