Skip to content

Commit

Permalink
Update crates/trie/sparse/src/trie.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
  • Loading branch information
shekhirin and rkrasiuk authored Dec 3, 2024
1 parent 7c4ee69 commit 98a9de8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/trie/sparse/src/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,7 @@ impl<P> RevealedSparseTrie<P> {

// Save a branch node update only if it's not a root node, and we need to
// persist updates.
let store_in_db_trie_value = if let (false, Some(updates)) =
(path.is_empty(), self.updates.as_mut())
let store_in_db_trie_value = if let Some(updates) = self.updates.as_mut().filter(|_| !path.is_empty()) {
{
let mut tree_mask_values = tree_mask_values.into_iter().rev();
let mut hash_mask_values = hash_mask_values.into_iter().rev();
Expand Down

0 comments on commit 98a9de8

Please sign in to comment.