-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: handles empty proofs in validateLeafHash and VerifyInclusion (#…
…184) ## Overview Closes #140 The changes made in this PR are considered to be breaking, as they modify the behavior of `VerifyInclusion`. In the prior version, the `VerifyInclusion` function would return `false` for the first test case named ["valid empty proof and leaves == empty."](https://github.com/celestiaorg/nmt/blob/712ed08a521b254b62a707a3f2d041d3f3a8d83f/proof_test.go#L442) of the `TestVerifyInclusion_EmptyProofs` suite. However, with the changes implemented, an empty proof for an empty set of leaves is now considered a valid proof. As a result, `VerifyInclusion` now returns `true`. cc: @liamsi ## Checklist - [x] New and updated code has appropriate documentation - [x] New and updated code has new and/or updated testing - [x] Required CI checks are passing - [x] Visual proof for any user facing features like CLI or documentation updates - [x] Linked issues closed with keywords
- Loading branch information
Showing
2 changed files
with
104 additions
and
7 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