Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nit(mpt): Remove unnecessary collapse_if_possible call #808

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions crates/mpt/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,10 @@
// If the child node is empty, convert the extension into an empty node.
*self = Self::Empty;
}
Self::Blinded { .. } => {
node.unblind(fetcher)?;
self.collapse_if_possible(fetcher, hinter)?;
_ => {
// If the child is a (blinded?) branch then no need for collapse
// because deletion did not collapse the (blinded?) branch

Check warning on line 442 in crates/mpt/src/node.rs

View check run for this annotation

Codecov / codecov/patch

crates/mpt/src/node.rs#L440-L442

Added lines #L440 - L442 were not covered by tests
}
_ => {}
},
Self::Branch { stack } => {
// Count non-empty children
Expand Down
Loading