Struct ethcore::state::backend::Basic
[−]
[src]
pub struct Basic<H>(pub H);
A basic backend. Just wraps the given database, directly inserting into and deleting from it. Doesn't cache anything.
Trait Implementations
impl<H: AsHashDB + Send + Sync> Backend for Basic<H>
[src]
impl<H: AsHashDB + Send + Sync> Backend for Basic<H>
fn as_hashdb(&self) -> &HashDB
[src]
fn as_hashdb(&self) -> &HashDB
Treat the backend as a read-only hashdb.
fn as_hashdb_mut(&mut self) -> &mut HashDB
[src]
fn as_hashdb_mut(&mut self) -> &mut HashDB
Treat the backend as a writeable hashdb.
fn add_to_account_cache(&mut self, _: Address, _: Option<Account>, _: bool)
[src]
fn add_to_account_cache(&mut self, _: Address, _: Option<Account>, _: bool)
Add an account entry to the cache.
fn cache_code(&self, _: H256, _: Arc<Vec<u8>>)
[src]
fn cache_code(&self, _: H256, _: Arc<Vec<u8>>)
Add a global code cache entry. This doesn't need to worry about canonicality because it simply maps hashes to raw code and will always be correct in the absence of hash collisions. Read more
fn get_cached_account(&self, _: &Address) -> Option<Option<Account>>
[src]
fn get_cached_account(&self, _: &Address) -> Option<Option<Account>>
Get basic copy of the cached account. Not required to include storage. Returns 'None' if cache is disabled or if the account is not cached. Read more
fn get_cached<F, U>(&self, _: &Address, _: F) -> Option<U> where
F: FnOnce(Option<&mut Account>) -> U,
[src]
fn get_cached<F, U>(&self, _: &Address, _: F) -> Option<U> where
F: FnOnce(Option<&mut Account>) -> U,
Get value from a cached account. None
is passed to the closure if the account entry cached is known not to exist. None
is returned if the entry is not cached. Read more
fn get_cached_code(&self, _: &H256) -> Option<Arc<Vec<u8>>>
[src]
fn get_cached_code(&self, _: &H256) -> Option<Arc<Vec<u8>>>
Get cached code based on hash.
fn note_non_null_account(&self, _: &Address)
[src]
fn note_non_null_account(&self, _: &Address)
Note that an account with the given address is non-null.
fn is_known_null(&self, _: &Address) -> bool
[src]
fn is_known_null(&self, _: &Address) -> bool
Check whether an account is known to be empty. Returns true if known to be empty, false otherwise. Read more