Ensure Spec::ensure_db_good() places DB entries for code & storage.
This commit is contained in:
@@ -25,6 +25,12 @@ impl<'db> SecTrieDBMut<'db> {
|
||||
pub fn from_existing(db: &'db mut HashDB, root: &'db mut H256) -> Self {
|
||||
SecTrieDBMut { raw: TrieDBMut::from_existing(db, root) }
|
||||
}
|
||||
|
||||
/// Get the backing database.
|
||||
pub fn db(&'db self) -> &'db HashDB { self.raw.db() }
|
||||
|
||||
/// Get the backing database.
|
||||
pub fn db_mut(&'db mut self) -> &'db mut HashDB { self.raw.db_mut() }
|
||||
}
|
||||
|
||||
impl<'db> Trie for SecTrieDBMut<'db> {
|
||||
|
||||
@@ -87,6 +87,11 @@ impl<'db> TrieDBMut<'db> {
|
||||
self.db
|
||||
}
|
||||
|
||||
/// Get the backing database.
|
||||
pub fn db_mut(&'db mut self) -> &'db mut HashDB {
|
||||
self.db
|
||||
}
|
||||
|
||||
/// Determine all the keys in the backing database that belong to the trie.
|
||||
pub fn keys(&self) -> Vec<H256> {
|
||||
let mut ret: Vec<H256> = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user