Skip to content
Snippets Groups Projects
Commit bb447b2d authored by Liu-Cheng Xu's avatar Liu-Cheng Xu
Browse files

Important: unify the insertion of child key values

Before this commit, every commit is an equalvalent rewrite.

This commit modifies the origin logic by moving the child_key_value
in `process_state_verified()` to the same place in `process_state_unverified()`.

Please review this very carefully.
parent 7b67beb8
No related merge requests found
......@@ -150,10 +150,6 @@ where
is_top && well_known_keys::is_child_storage_key(key_value.0.as_slice())
});
for key_value in child_key_values {
self.insert_child_trie_roots(key_value);
}
let entry = self.state.entry(state_root).or_default();
if entry.0.len() > 0 && entry.1.len() > 1 {
......@@ -165,6 +161,10 @@ where
}
entry.0.extend(top_key_values);
for key_value in child_key_values {
self.insert_child_trie_roots(key_value);
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment