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]
evm_state: impl AsRef<Path>,
evm_genesis: impl AsRef<Path>,
root_hash: H256,
timestamp: u64,
spv_compatibility: bool
) -> Result<Self, Error>
pub fn new_from_parent(
&self,
block_start_time: i64,
spv_compatibility: bool
) -> Self[src][−]
&self,
block_start_time: i64,
spv_compatibility: bool
) -> Self
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]
path: P,
evm_persist_feilds: impl Into<EvmPersistState>
) -> Result<Self, Error>
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]
&mut self,
slot: u64,
last_blockhash: [u8; 32]
) -> Result<Option<H256>, Error>
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]
&self,
root: H256,
address: H160
) -> Option<AccountState>
pub fn get_storage_at(
&self,
root: H256,
address: H160,
index: H256
) -> Option<H256>[src]
&self,
root: H256,
address: H160,
index: H256
) -> Option<H256>
Trait Implementations
impl AccountProvider for EvmState[src][+]
impl Clone for EvmState[src][+]
impl Debug for EvmState[src][+]
impl Default for EvmState[src][+]
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> From<T> for T[src][+]
impl<T, U> Into<U> for T where
U: From<T>, [src][+]
U: From<T>,
impl<T> MaybeDebug for T where
T: Debug, [src]
T: Debug,
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src][+]
V: MultiLane<T>,