Struct era_test_node::fork::ForkStorage
source · pub struct ForkStorage<S> {
pub inner: Arc<RwLock<ForkStorageInner<S>>>,
pub chain_id: L2ChainId,
}Expand description
In memory storage, that allows ‘forking’ from other network. If forking is enabled, it reads missing data from remote location. S - is a struct that is used for source of the fork.
Fields§
§inner: Arc<RwLock<ForkStorageInner<S>>>§chain_id: L2ChainIdImplementations§
source§impl<S: ForkSource> ForkStorage<S>
impl<S: ForkSource> ForkStorage<S>
pub fn new( fork: Option<ForkDetails<S>>, system_contracts_options: &Options ) -> Self
pub fn load_factory_dep_internal(&self, hash: H256) -> Option<Vec<u8>>
source§impl<S> ForkStorage<S>
impl<S> ForkStorage<S>
Trait Implementations§
source§impl<S: Clone> Clone for ForkStorage<S>
impl<S: Clone> Clone for ForkStorage<S>
source§fn clone(&self) -> ForkStorage<S>
fn clone(&self) -> ForkStorage<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<S: Debug> Debug for ForkStorage<S>
impl<S: Debug> Debug for ForkStorage<S>
source§impl<S: Debug + ForkSource> ReadStorage for &ForkStorage<S>
impl<S: Debug + ForkSource> ReadStorage for &ForkStorage<S>
source§fn read_value(&mut self, key: &StorageKey) -> StorageValue
fn read_value(&mut self, key: &StorageKey) -> StorageValue
Read value of the key.
source§fn is_write_initial(&mut self, key: &StorageKey) -> bool
fn is_write_initial(&mut self, key: &StorageKey) -> bool
Checks whether a write to this storage at the specified
key would be an initial write.
Roughly speaking, this is the case when the storage doesn’t contain key, although
in case of mutable storages, the caveats apply (a write to a key that is present
in the storage but was not committed is still an initial write).source§fn load_factory_dep(&mut self, hash: H256) -> Option<Vec<u8>>
fn load_factory_dep(&mut self, hash: H256) -> Option<Vec<u8>>
Load the factory dependency code by its hash.
§fn is_bytecode_known(&mut self, bytecode_hash: &H256) -> bool
fn is_bytecode_known(&mut self, bytecode_hash: &H256) -> bool
Returns whether a bytecode hash is “known” to the system.
source§impl<S: Debug + ForkSource> ReadStorage for ForkStorage<S>
impl<S: Debug + ForkSource> ReadStorage for ForkStorage<S>
source§fn is_write_initial(&mut self, key: &StorageKey) -> bool
fn is_write_initial(&mut self, key: &StorageKey) -> bool
Checks whether a write to this storage at the specified
key would be an initial write.
Roughly speaking, this is the case when the storage doesn’t contain key, although
in case of mutable storages, the caveats apply (a write to a key that is present
in the storage but was not committed is still an initial write).source§fn load_factory_dep(&mut self, hash: H256) -> Option<Vec<u8>>
fn load_factory_dep(&mut self, hash: H256) -> Option<Vec<u8>>
Load the factory dependency code by its hash.
source§fn read_value(&mut self, key: &StorageKey) -> StorageValue
fn read_value(&mut self, key: &StorageKey) -> StorageValue
Read value of the key.
§fn is_bytecode_known(&mut self, bytecode_hash: &H256) -> bool
fn is_bytecode_known(&mut self, bytecode_hash: &H256) -> bool
Returns whether a bytecode hash is “known” to the system.
Auto Trait Implementations§
impl<S> RefUnwindSafe for ForkStorage<S>
impl<S> Send for ForkStorage<S>where S: Send + Sync,
impl<S> Sync for ForkStorage<S>where S: Send + Sync,
impl<S> Unpin for ForkStorage<S>
impl<S> UnwindSafe for ForkStorage<S>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more