pub fn key_changes_proof_check<S: RootsStorage<H>, H: Hasher>(
	config: &Configuration,
	roots_storage: &S,
	proof: Vec<Vec<u8>>,
	begin: u64,
	end: &AnchorBlockId<H::Out>,
	max: u64,
	key: &[u8]
) -> Result<Vec<(u64, u32)>, String> where H::Out: HeapSizeOf {
	// we can't query any roots before root
	let max = ::std::cmp::min(max, end.number);

	let mut proof_db = MemoryDB::<H>::default();
	for item in proof {
		proof_db.insert(&[], &item);
	}

	let proof_db = InMemoryStorage::with_db(proof_db);
	DrilldownIterator {
		essence: DrilldownIteratorEssence {
			key,
			roots_storage,
			storage: &proof_db,
			begin,
			end,
			surface: surface_iterator(config, max, begin, end.number)?,

			extrinsics: Default::default(),
			blocks: Default::default(),

			_hasher: ::std::marker::PhantomData::<H>::default(),
		},
	}.collect()
}
/// Check key changes proog and return changes of the key at given blocks range.
/// `max` is the number of best known block.
/// Changes are returned in descending order (i.e. last block comes first).
Check key changes proog and return changes of the key at given blocks range.
`max` is the number of best known block.
Changes are returned in descending order .
Check key changes proog and return changes of the key at given blocks range . ` max ` is the number of best known block . Changes are returned in descending order .
pub fn key_changes_proof_check<S: RootsStorage<H>, H: Hasher>(
	config: &Configuration,
	roots_storage: &S,
	proof: Vec<Vec<u8>>,
	begin: u64,
	end: &AnchorBlockId<H::Out>,
	max: u64,
	key: &[u8]
) -> Result<Vec<(u64, u32)>, String> where H::Out: HeapSizeOf {
	// we can't query any roots before root
	let max = ::std::cmp::min(max, end.number);
	let mut proof_db = MemoryDB::<H>::default();
	for item in proof {
		proof_db.insert(&[], &item);
	}
	let proof_db = InMemoryStorage::with_db(proof_db);
	DrilldownIterator {
		essence: DrilldownIteratorEssence {
			key,
			roots_storage,
			storage: &proof_db,
			begin,
			end,
			surface: surface_iterator(config, max, begin, end.number)?,
			extrinsics: Default::default(),
			blocks: Default::default(),
			_hasher: ::std::marker::PhantomData::<H>::default(),
		},
	}.collect()
}
pub fn key_changes_proof_check < S : RootsStorage < H > , H : Hasher > ( config : & Configuration , roots_storage : & S , proof : Vec < Vec < u8 > > , begin : u64 , end : & AnchorBlockId < H :: Out > , max : u64 , key : & [ u8 ] ) -> Result < Vec < ( u64 , u32 ) > , String > where H :: Out : HeapSizeOf { // we can't query any roots before root let max = :: std :: cmp :: min ( max , end . number ) ; let mut proof_db = MemoryDB :: < H > :: default ( ) ; for item in proof { proof_db . insert ( & [ ] , & item ) ; } let proof_db = InMemoryStorage :: with_db ( proof_db ) ; DrilldownIterator { essence : DrilldownIteratorEssence { key , roots_storage , storage : & proof_db , begin , end , surface : surface_iterator ( config , max , begin , end . number ) ? , extrinsics : Default :: default ( ) , blocks : Default :: default ( ) , _hasher : :: std :: marker :: PhantomData :: < H > :: default ( ) , } , } . collect ( ) }
Check key changes proog and return changes of the key at given blocks range.
Check key changes proog and return changes of the key at given blocks range .
config
&Configuration
roots_storage
&S
proof
Vec<Vec<u8>>
begin
u64
end
&AnchorBlockId<H::Out>
max
u64
key
&[u8]
config
&Configuration
roots_storage
&S
proof
Vec<Vec<u8>>
begin
u64
end
&AnchorBlockId<H::Out>
max
u64
key
&[u8]