1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use aptos_crypto::HashValue;
use aptos_types::{
proof::SparseMerkleProof,
state_store::{state_key::StateKey, state_value::StateValue},
transaction::Version,
};
use std::collections::HashMap;
pub trait ProofFetcher: Sync + Send {
fn fetch_state_value_and_proof(
&self,
state_key: &StateKey,
version: Version,
) -> anyhow::Result<(Option<StateValue>, Option<SparseMerkleProof>)>;
fn get_proof_cache(&self) -> HashMap<HashValue, SparseMerkleProof>;
}