Closed rach-id closed 3 months ago
The updates enhance error handling in the VerifySubtreeRootInclusion
and nextLeafRange
functions, improving their robustness against invalid inputs. The test suite has been refined with new cases to stress test these functions, particularly focusing on edge cases that could lead to stack overflow errors. These changes ensure better reliability and stability in the code.
Files | Change Summary |
---|---|
proof.go , proof_test.go |
Improved error handling in VerifySubtreeRootInclusion and nextLeafRange . Refined test cases to focus on error scenarios, including new checks for valid ranges and handling of edge cases. |
sequenceDiagram
participant User
participant Proof
participant Tree
User->>Tree: Request subtree root inclusion verification
Tree->>Proof: VerifySubtreeRootInclusion()
alt Valid range
Proof-->>User: Return success
else Invalid range
Proof-->>User: Return error
end
Objective | Addressed | Explanation |
---|---|---|
Fix recursion bug in VerifySubtreeRootInclusion (267) |
✅ | |
Improve error handling for invalid ranges (267) | ✅ |
🐰 "Hop along, my code so bright,
With checks and tests, it's a delight!
No more stack overflow to fear,
Robust and ready, let's all cheer!
In every leaf, in every root,
Together we code, oh what a hoot!" 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 71.42857%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 68.01%. Comparing base (
1278ba2
) to head (1f103a3
).
Files | Patch % | Lines |
---|---|---|
proof.go | 71.42% | 1 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Overview
Closes: https://github.com/celestiaorg/nmt/issues/267
Summary by CodeRabbit
New Features
Bug Fixes
Tests