mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
feat: generalize some functions in sp-trie (#12376)
* feat: add to_memory_db to StorageProof * feat: add iter method and generalize iter_nodes * fmt * feat: generalize `encode_compact` like `decode_compact`, add to_compact_proof to StorageProof * fix to_compact_proof * improve by suggestions * improve by suggestions Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -1190,8 +1190,8 @@ where
|
||||
let (proof, count) = prove_range_read_with_child_with_size::<_, HashFor<Block>>(
|
||||
state, size_limit, start_key,
|
||||
)?;
|
||||
// This is read proof only, we can use either LayoutV0 or LayoutV1.
|
||||
let proof = sp_trie::encode_compact::<sp_trie::LayoutV0<HashFor<Block>>>(proof, root)
|
||||
let proof = proof
|
||||
.into_compact_proof::<HashFor<Block>>(root)
|
||||
.map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))?;
|
||||
Ok((proof, count))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user