Enum solana_evm_loader_program::scope::evm::EvmState [−][src]
Variants
Committed(EvmBackend<Committed>)Incomming(EvmBackend<Incomming>)Implementations
impl EvmState[src]
pub fn new<P>(path: P) -> Result<EvmState, Error> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
pub fn new_from_genesis(
evm_state: impl AsRef<Path>,
evm_genesis: impl AsRef<Path>,
root_hash: H256,
timestamp: u64,
spv_compatibility: bool
) -> Result<EvmState, Error>[src]
evm_state: impl AsRef<Path>,
evm_genesis: impl AsRef<Path>,
root_hash: H256,
timestamp: u64,
spv_compatibility: bool
) -> Result<EvmState, Error>
pub fn new_from_parent(
&self,
block_start_time: i64,
spv_compatibility: bool
) -> EvmState[src]
&self,
block_start_time: i64,
spv_compatibility: bool
) -> EvmState
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>(
path: P,
evm_persist_feilds: impl Into<EvmPersistState>
) -> Result<EvmState, Error> where
P: AsRef<Path>, [src]
path: P,
evm_persist_feilds: impl Into<EvmPersistState>
) -> Result<EvmState, Error> where
P: AsRef<Path>,
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]
pub fn get_account_state(&self, address: H160) -> Option<AccountState>[src]
pub fn get_storage(&self, address: H160, index: H256) -> Option<H256>[src]
pub fn last_root(&self) -> H256[src]
pub fn block_number(&self) -> u64[src]
pub fn timestamp(&self) -> u64[src]
pub 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]
pub fn from(comm: EvmBackend<Committed>) -> EvmState[src]
impl From<EvmBackend<Incomming>> for EvmState[src]
pub 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<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src]
V: MultiLane<T>,