Trait sp_trie::TrieRecorder

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

Various re-exports from the trie-db crate. 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§

source

fn record<'a>(&mut self, access: TrieAccess<'a, H>)

Record the given TrieAccess.

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

source

fn trie_nodes_recorded_for_key(&self, key: &[u8]) -> RecordedForKey

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

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

Implementors§

source§

impl<'a, H: Hasher> TrieRecorder<<H as Hasher>::Out> for TrieRecorder<'a, H>

source§

impl<H: Hash + Ord> TrieRecorder<H> for AccessedNodesTracker<H>

source§

impl<L> TrieRecorder<<<L as TrieLayout>::Hash as Hasher>::Out> for Recorder<L>
where L: TrieLayout,