-
Notifications
You must be signed in to change notification settings - Fork 270
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
update the nmt wrapper to the new rsmt2d.Tree interface #256
Conversation
Codecov Report
@@ Coverage Diff @@
## master #256 +/- ##
==========================================
+ Coverage 60.87% 62.07% +1.19%
==========================================
Files 261 260 -1
Lines 23640 23164 -476
==========================================
- Hits 14392 14380 -12
+ Misses 7759 7295 -464
Partials 1489 1489
|
var _ rsmt2d.Tree = &nmtWrapper{} | ||
|
||
func newNmtConstructor() rsmt2d.Tree { | ||
return &nmtWrapper{ | ||
nmt.New(sha256.New()), | ||
} | ||
} | ||
|
||
// we could get rid of this wrapper and use the nmt directly if we | ||
// make Push take in the data as one one byte array (instead of two). | ||
type nmtWrapper struct { | ||
*nmt.NamespacedMerkleTree | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wrapper in the ipld plugin was not needed, because it was not used to generate roots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR updates the nmt wrapper to the new rsmt2d.Tree interface.
I'm leaving as a draft as I think there are somethings that still need to be updated before this can be merged.good to go.Closes: #255