Enum evm_state::EvmState [−][src]
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]
fn get_account_state(&self, address: H160) -> Option<AccountState>
[src]
fn get_storage(&self, address: H160, index: H256) -> Option<H256>
[src]
fn last_root(&self) -> H256
[src]
fn block_number(&self) -> u64
[src]
fn timestamp(&self) -> u64
[src]
fn block_version(&self) -> BlockVersion
[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]
fn from(comm: EvmBackend<Committed>) -> EvmState
[src]
impl From<EvmBackend<Incomming>> for EvmState
[src]
fn from(inc: EvmBackend<Incomming>) -> 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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,