mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Fix compact proof decoding unaccessed last child trie. (#9715)
* fix no child proof attached but root included. * small stress test for proof of child tries. * rust fmt
This commit is contained in:
@@ -161,8 +161,9 @@ where
|
||||
}
|
||||
|
||||
let mut previous_extracted_child_trie = None;
|
||||
let mut nodes_iter = nodes_iter.peekable();
|
||||
for child_root in child_tries.into_iter() {
|
||||
if previous_extracted_child_trie.is_none() {
|
||||
if previous_extracted_child_trie.is_none() && nodes_iter.peek().is_some() {
|
||||
let (top_root, _) =
|
||||
trie_db::decode_compact_from_iter::<L, _, _, _>(db, &mut nodes_iter)?;
|
||||
previous_extracted_child_trie = Some(top_root);
|
||||
|
||||
Reference in New Issue
Block a user