don't return a state in state_at if the db prunes and the block is before guaranteed history
This commit is contained in:
@@ -175,6 +175,8 @@ impl JournalDB for ArchiveDB {
|
||||
fn state(&self, id: &H256) -> Option<Bytes> {
|
||||
self.backing.get_by_prefix(&id.bytes()[0..12]).and_then(|b| Some(b.to_vec()))
|
||||
}
|
||||
|
||||
fn does_pruning(&self) -> bool { false }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -42,4 +42,7 @@ pub trait JournalDB : HashDB + Send + Sync {
|
||||
fn state(&self, _id: &H256) -> Option<Bytes> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Whether this database does pruning.
|
||||
fn does_pruning(&self) -> bool { true }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user