ExecutorProxyTrait

Trait ExecutorProxyTrait 

Source
pub trait ExecutorProxyTrait: Send {
    // Required methods
    fn get_local_storage_state(&self) -> Result<SyncState, Error>;
    fn get_epoch_change_ledger_info(
        &self,
        epoch: u64,
    ) -> Result<LedgerInfoWithSignatures, Error>;
    fn get_version_timestamp(&self, version: u64) -> Result<u64, Error>;
    fn publish_on_chain_config_updates(
        &mut self,
        events: Vec<ContractEvent>,
    ) -> Result<(), Error>;
}
Expand description

Proxies interactions with execution and storage for state synchronization

Required Methods§

Source

fn get_local_storage_state(&self) -> Result<SyncState, Error>

Sync the local state with the latest in storage.

Source

fn get_epoch_change_ledger_info( &self, epoch: u64, ) -> Result<LedgerInfoWithSignatures, Error>

Get the epoch changing ledger info for the given epoch so that we can move to next epoch.

Source

fn get_version_timestamp(&self, version: u64) -> Result<u64, Error>

Returns the ledger’s timestamp for the given version in microseconds

Source

fn publish_on_chain_config_updates( &mut self, events: Vec<ContractEvent>, ) -> Result<(), Error>

publishes on-chain config updates to subscribed components

Implementors§