Struct ethcore::state::backend::Proving
[−]
[src]
pub struct Proving<H: AsHashDB> { /* fields omitted */ }
Proving state backend.
This keeps track of all state values loaded during usage of this backend.
The proof-of-execution can be extracted with extract_proof
.
This doesn't cache anything or rely on the canonical state caches.
Methods
impl<H: AsHashDB> Proving<H>
[src]
impl<H: AsHashDB> Proving<H>
pub fn new(base: H) -> Self
[src]
pub fn new(base: H) -> Self
Create a new Proving
over a base database.
This will store all values ever fetched from that base.
pub fn extract_proof(self) -> Vec<DBValue>
[src]
pub fn extract_proof(self) -> Vec<DBValue>
Consume the backend, extracting the gathered proof in lexicographical order by value.
Trait Implementations
impl<H: AsHashDB + Send + Sync> HashDB for Proving<H>
[src]
impl<H: AsHashDB + Send + Sync> HashDB for Proving<H>
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<H: AsHashDB + Send + Sync> Backend for Proving<H>
[src]
impl<H: AsHashDB + Send + Sync> Backend for Proving<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
impl<H: AsHashDB + Clone> Clone for Proving<H>
[src]
impl<H: AsHashDB + Clone> Clone for Proving<H>