Struct ethcore::state::backend::ProofCheck
[−]
[src]
pub struct ProofCheck(_);
A raw backend used to check proofs of execution.
This doesn't delete anything since execution proofs won't have mangled keys and we want to avoid collisions.
Methods
impl ProofCheck
[src]
impl ProofCheck
pub fn new(proof: &[DBValue]) -> Self
[src]
pub fn new(proof: &[DBValue]) -> Self
Create a new ProofCheck
backend from the given state items.
Trait Implementations
impl Clone for ProofCheck
[src]
impl Clone for ProofCheck
fn clone(&self) -> ProofCheck
[src]
fn clone(&self) -> ProofCheck
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for ProofCheck
[src]
impl PartialEq for ProofCheck
fn eq(&self, __arg_0: &ProofCheck) -> bool
[src]
fn eq(&self, __arg_0: &ProofCheck) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ProofCheck) -> bool
[src]
fn ne(&self, __arg_0: &ProofCheck) -> bool
This method tests for !=
.
impl HashDB for ProofCheck
[src]
impl HashDB for ProofCheck
fn keys(&self) -> HashMap<H256, i32>
[src]
fn keys(&self) -> HashMap<H256, i32>
Get the keys in the database together with number of underlying references.
fn get(&self, key: &H256) -> Option<DBValue>
[src]
fn get(&self, key: &H256) -> Option<DBValue>
Look up a given hash into the bytes that hash to it, returning None if the hash is not known. Read more
fn contains(&self, key: &H256) -> bool
[src]
fn contains(&self, key: &H256) -> bool
Check for the existance of a hash-key.
fn insert(&mut self, value: &[u8]) -> H256
[src]
fn insert(&mut self, value: &[u8]) -> H256
Insert a datum item into the DB and return the datum's hash for a later lookup. Insertions are counted and the equivalent number of remove()
s must be performed before the data is considered dead. Read more
fn emplace(&mut self, key: H256, value: DBValue)
[src]
fn emplace(&mut self, key: H256, value: DBValue)
Like insert()
, except you provide the key and the data is all moved.
fn remove(&mut self, _key: &H256)
[src]
fn remove(&mut self, _key: &H256)
Remove a datum previously inserted. Insertions can be "owed" such that the same number of insert()
s may happen without the data being eventually being inserted into the DB. It can be "owed" more than once. Read more
impl Backend for ProofCheck
[src]
impl Backend for ProofCheck
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,
_addr: Address,
_data: Option<Account>,
_modified: bool
)
[src]
fn add_to_account_cache(
&mut self,
_addr: Address,
_data: Option<Account>,
_modified: bool
)
Add an account entry to the cache.
fn cache_code(&self, _hash: H256, _code: Arc<Vec<u8>>)
[src]
fn cache_code(&self, _hash: H256, _code: 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, _addr: &Address) -> Option<Option<Account>>
[src]
fn get_cached_account(&self, _addr: &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, _a: &Address, _f: F) -> Option<U> where
F: FnOnce(Option<&mut Account>) -> U,
[src]
fn get_cached<F, U>(&self, _a: &Address, _f: 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, _hash: &H256) -> Option<Arc<Vec<u8>>>
[src]
fn get_cached_code(&self, _hash: &H256) -> Option<Arc<Vec<u8>>>
Get cached code based on hash.
fn note_non_null_account(&self, _address: &Address)
[src]
fn note_non_null_account(&self, _address: &Address)
Note that an account with the given address is non-null.
fn is_known_null(&self, _address: &Address) -> bool
[src]
fn is_known_null(&self, _address: &Address) -> bool
Check whether an account is known to be empty. Returns true if known to be empty, false otherwise. Read more
Auto Trait Implementations
impl Send for ProofCheck
impl Send for ProofCheck
impl Sync for ProofCheck
impl Sync for ProofCheck