reth_trie_db

Trait DatabaseTrieWitness

Source
pub trait DatabaseTrieWitness<'a, TX> {
    // Required methods
    fn from_tx(tx: &'a TX) -> Self;
    fn overlay_witness(
        tx: &'a TX,
        input: TrieInput,
        target: HashedPostState,
    ) -> Result<HashMap<B256, Bytes>, TrieWitnessError>;
}
Expand description

Extends TrieWitness with operations specific for working with a database transaction.

Required Methods§

Source

fn from_tx(tx: &'a TX) -> Self

Create a new TrieWitness from database transaction.

Source

fn overlay_witness( tx: &'a TX, input: TrieInput, target: HashedPostState, ) -> Result<HashMap<B256, Bytes>, TrieWitnessError>

Generates trie witness for target state based on TrieInput.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, TX: DbTx> DatabaseTrieWitness<'a, TX> for TrieWitness<DatabaseTrieCursorFactory<'a, TX>, DatabaseHashedCursorFactory<'a, TX>>

Source§

fn from_tx(tx: &'a TX) -> Self

Source§

fn overlay_witness( tx: &'a TX, input: TrieInput, target: HashedPostState, ) -> Result<HashMap<B256, Bytes>, TrieWitnessError>

Implementors§