Enum evm_state::EvmState[][src]

pub enum EvmState {
    Committed(EvmBackend<Committed>),
    Incomming(EvmBackend<Incomming>),
}

Variants

Committed(EvmBackend<Committed>)
Incomming(EvmBackend<Incomming>)

Implementations

impl EvmState[src]

pub fn new<P: AsRef<Path>>(path: P) -> Result<Self, Error>[src]

pub fn new_from_genesis(
    evm_state: impl AsRef<Path>,
    evm_genesis: impl AsRef<Path>,
    root_hash: H256,
    timestamp: u64,
    spv_compatibility: bool
) -> Result<Self, Error>
[src]

pub fn new_from_parent(
    &self,
    block_start_time: i64,
    spv_compatibility: bool
) -> Self
[src]

Ignores all unapplied updates. spv_compatibility - is oneway feature flag, if activated change current version from InitVersion to VersionConsistentHashes (dont change if version is feature).

pub fn load_from<P: AsRef<Path>>(
    path: P,
    evm_persist_feilds: impl Into<EvmPersistState>
) -> Result<Self, Error>
[src]

pub fn make_backup(&self) -> Result<PathBuf, Error>[src]

Make backup of current kvs storage.

pub fn save_state(self) -> EvmPersistState[src]

Convert current state into persist one. With persist state and database, one can load evm state back to memory. Consume self, so outer code should call clone(). Cloning KVS is cheap, and most work is in cloning state itself.

pub fn kvs_references(&self) -> usize[src]

pub fn try_commit(
    &mut self,
    slot: u64,
    last_blockhash: [u8; 32]
) -> Result<Option<H256>, Error>
[src]

pub fn get_block(&self) -> Option<Block>[src]

Return block header if this state was committed before.

pub fn get_account_state_at(
    &self,
    root: H256,
    address: H160
) -> Option<AccountState>
[src]

pub fn get_storage_at(
    &self,
    root: H256,
    address: H160,
    index: H256
) -> Option<H256>
[src]

Trait Implementations

impl AccountProvider for EvmState[src]

impl Clone for EvmState[src]

impl Debug for EvmState[src]

impl Default for EvmState[src]

NOTE: Only for testing purposes.

impl From<EvmBackend<Committed>> for EvmState[src]

impl From<EvmBackend<Incomming>> for EvmState[src]

Auto Trait Implementations

impl RefUnwindSafe for EvmState

impl Send for EvmState

impl Sync for EvmState

impl Unpin for EvmState

impl UnwindSafe for EvmState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]