Skip to content

Commit

Permalink
Fixed a failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
BGluth committed Mar 1, 2024
1 parent a5a3a40 commit 132475a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mpt_trie/src/trie_subsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ fn mark_nodes_that_are_needed<N: PartialTrie>(
return Err(SubsetTrieError::UnexpectedKey(
*curr_nibbles,
format!("{:?}", trie),
))
));
}
true => {
trie.info.touched = true;
Expand Down Expand Up @@ -716,14 +716,14 @@ mod tests {
}

#[test]
fn sub_trie_for_non_existent_key_that_hits_branch_leaf_hashes_out_leaf() {
fn sub_trie_for_non_existent_key_that_hits_branch_leaf_does_not_hash_out_leaf() {
common_setup();

let trie = create_trie_with_large_entry_nodes(&[0x1234, 0x1234589, 0x12346]);
let partial_trie = create_trie_subset(&trie, [0x1234567]).unwrap();

// Note that `0x1234589` gets hashed at the branch slot at `0x12345`.
assert_nodes_are_hash_nodes(&partial_trie, [0x12345, 0x12346]);
assert_nodes_are_hash_nodes(&partial_trie, Vec::<Nibbles>::default());
}

#[test]
Expand Down

0 comments on commit 132475a

Please sign in to comment.