Skip to main content

StateRootSink

Trait StateRootSink 

pub trait StateRootSink:
    Send
    + Sync
    + 'static {
    // Required methods
    fn on_state_update(
        &self,
        state: HashMap<Address, Account, FbBuildHasher<20>>,
    );
    fn on_hashed_state_update(&self, state: HashedPostState);
    fn on_updates_finished(&self);

    // Provided method
    fn on_access_hint(&self, _hint: StateAccessHint) { ... }
}
Expand description

Semantic update stream consumed by state-root tasks.

Required Methods§

fn on_state_update(&self, state: HashMap<Address, Account, FbBuildHasher<20>>)

Authoritative state update from normal block execution.

fn on_hashed_state_update(&self, state: HashedPostState)

Authoritative pre-hashed state update, currently used by BAL streaming.

fn on_updates_finished(&self)

Signals that no more authoritative state updates are expected.

Provided Methods§

fn on_access_hint(&self, _hint: StateAccessHint)

Best-effort access hint from transaction prewarming.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§