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:
yjhandBastian Köcher authored and GitHub committed 2022-10-25 07:04:32 +00:00
1 parent 54204d7628
commit 9375665218
7 files changed
+56 -45

No files matched your search

+2 -2
View File
@@ -57,10 +57,10 @@ pub use trie_db::{
pub use trie_stream::TrieStream;
/// substrate trie layout
pub struct LayoutV0<H>(sp_std::marker::PhantomData<H>);
pub struct LayoutV0<H>(PhantomData<H>);
/// substrate trie layout, with external value nodes.
pub struct LayoutV1<H>(sp_std::marker::PhantomData<H>);
pub struct LayoutV1<H>(PhantomData<H>);
impl<H> TrieLayout for LayoutV0<H>
where