Trait trie_db::TrieRecorder

source ·
pub trait TrieRecorder<H> {
    fn record<'a>(&mut self, access: TrieAccess<'a, H>);
    fn trie_nodes_recorded_for_key(&self, key: &[u8]) -> RecordedForKey;
}
Expand description

A trie recorder that can be used to record all kind of TrieAccess’s.

To build a trie proof a recorder is required that records all trie accesses. These recorded trie accesses can then be used to create the proof.

Required Methods§

Record the given TrieAccess.

Depending on the TrieAccess a call of Self::trie_nodes_recorded_for_key afterwards must return the correct recorded state.

Check if we have recorded any trie nodes for the given key.

Returns RecordedForKey to express the state of the recorded trie nodes.

Implementors§