Trait UpdateStateData

Source
pub trait UpdateStateData<Types: NodeType, State: MerklizedState<Types, ARITY>, const ARITY: usize>: Send + Sync {
    // Required methods
    fn set_last_state_height<'life0, 'async_trait>(
        &'life0 mut self,
        height: usize,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn insert_merkle_nodes<'life0, 'async_trait>(
        &'life0 mut self,
        path: MerkleProof<State::Entry, State::Key, State::T, ARITY>,
        traversal_path: Vec<usize>,
        block_number: u64,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

This trait defines methods for updating the storage with the merkle tree state.

Required Methods§

Source

fn set_last_state_height<'life0, 'async_trait>( &'life0 mut self, height: usize, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn insert_merkle_nodes<'life0, 'async_trait>( &'life0 mut self, path: MerkleProof<State::Entry, State::Key, State::T, ARITY>, traversal_path: Vec<usize>, block_number: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<D, U, Types, State, const ARITY: usize> UpdateStateData<Types, State, ARITY> for ExtensibleDataSource<D, U>
where D: UpdateStateData<Types, State, ARITY> + Send + Sync, U: Send + Sync, State: MerklizedState<Types, ARITY>, Types: NodeType,

Source§

impl<Types: NodeType, State: MerklizedState<Types, ARITY>, const ARITY: usize> UpdateStateData<Types, State, ARITY> for Transaction<Write>