pub fn read_range_proof_check_on_proving_backend<H>(
proving_backend: &TrieBackend<MemoryDB<H>, H>,
child_info: Option<&ChildInfo>,
prefix: Option<&[u8]>,
count: Option<u32>,
start_at: Option<&[u8]>
) -> Result<(Vec<(Vec<u8>, Vec<u8>)>, bool), Box<dyn Error>>where
H: Hasher,
H::Out: Ord + Codec,
Expand description
Check storage range proof on pre-created proving backend.
Returns a vector with the read key => value
pairs and a bool
that is set to true
when
all key => value
pairs could be read and no more are left.
Examples found in repository?
src/lib.rs (lines 1092-1098)
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099
pub fn read_range_proof_check<H>(
root: H::Out,
proof: StorageProof,
child_info: Option<&ChildInfo>,
prefix: Option<&[u8]>,
count: Option<u32>,
start_at: Option<&[u8]>,
) -> Result<(Vec<(Vec<u8>, Vec<u8>)>, bool), Box<dyn Error>>
where
H: Hasher + 'static,
H::Out: Ord + Codec,
{
let proving_backend = create_proof_check_backend::<H>(root, proof)?;
read_range_proof_check_on_proving_backend(
&proving_backend,
child_info,
prefix,
count,
start_at,
)
}