Merge branch 'master' of github.com:ethcore/parity into ark

This commit is contained in:
arkpar
2016-01-27 17:31:45 +01:00
68 changed files with 1442 additions and 367 deletions

View File

@@ -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> {

View File

@@ -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();