Function sp_trie::encode_compact
source · pub fn encode_compact<L, DB>(
partial_db: &DB,
root: &TrieHash<L>
) -> Result<CompactProof, Error<TrieHash<L>, CError<L>>>where
L: TrieConfiguration,
DB: HashDBT<L::Hash, DBValue> + HashDBRef<L::Hash, DBValue>,
Expand description
Trie codec reexport, mainly child trie support for trie compact proof. Trie codec reexport, mainly child trie support for trie compact proof. Encode a compact proof.
Takes as input all full encoded node from the proof, and the root. Then parse all child trie root and compress main trie content first then all child trie contents. Child trie are ordered by the order of their roots in the top trie.