Trait storage_interface::proof_fetcher::ProofFetcher
source · [−]pub trait ProofFetcher: Sync + Send {
fn fetch_state_value_and_proof(
&self,
state_key: &StateKey,
version: Version
) -> Result<(Option<StateValue>, Option<SparseMerkleProof>)>;
fn get_proof_cache(&self) -> HashMap<HashValue, SparseMerkleProof>;
}Expand description
Defines the trait for fetching proof from the DB
Required Methods
fn fetch_state_value_and_proof(
&self,
state_key: &StateKey,
version: Version
) -> Result<(Option<StateValue>, Option<SparseMerkleProof>)>
fn fetch_state_value_and_proof(
&self,
state_key: &StateKey,
version: Version
) -> Result<(Option<StateValue>, Option<SparseMerkleProof>)>
API to fetch the state value along with proof
fn get_proof_cache(&self) -> HashMap<HashValue, SparseMerkleProof>
fn get_proof_cache(&self) -> HashMap<HashValue, SparseMerkleProof>
API to return all the proofs fetched by the proof fetcher so far.