-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/237 mpt trie ext to branch collapse error (#455)
* Added `Nibbles::empty()` - While `Nibbles::default()` already does this, I think having an explicit method that makes an empty `Nibbles` is a bit cleaner, even if it's a bit redundant. * Now returns an error if we collapse an `E --> H` - Unsafe, as if the extension was pointing to a (hashed) leaf, then we must collapse the extension into the leaf. - However, because the leaf is hashed, we can not tell that the hash node is from a leaf and also can not extract the leaf's key. - It's the user's responsibility to ensure that this scenario never occurs, so we need to return an error when it does. * Requested PR changes for #455
- Loading branch information
Showing
2 changed files
with
85 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters