Minor tidy up.
This commit is contained in:
parent
62a0737e59
commit
9203dbdca2
@ -109,7 +109,12 @@ impl<'db> TrieDB<'db> {
|
|||||||
|
|
||||||
/// Get the root node's RLP.
|
/// Get the root node's RLP.
|
||||||
fn root_node(&self) -> Node {
|
fn root_node(&self) -> Node {
|
||||||
Node::decoded(self.db.lookup(&self.root).expect("Trie root not found!"))
|
Node::decoded(self.root_data())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get the data of the root node.
|
||||||
|
fn root_data(&self) -> &[u8] {
|
||||||
|
self.db.lookup(&self.root).expect("Trie root not found!")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the root node as a `Node`.
|
/// Get the root node as a `Node`.
|
||||||
@ -242,7 +247,7 @@ impl<'a> TrieDBIterator<'a> {
|
|||||||
trail: vec![],
|
trail: vec![],
|
||||||
key_nibbles: Vec::new(),
|
key_nibbles: Vec::new(),
|
||||||
};
|
};
|
||||||
r.descend(db.db.lookup(&db.root).expect("Trie root not found!"));
|
r.descend(db.root_data());
|
||||||
r
|
r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user