-
Notifications
You must be signed in to change notification settings - Fork 42
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
Reuse hash #40
Reuse hash #40
Conversation
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
==========================================
+ Coverage 93.77% 94.78% +1.01%
==========================================
Files 7 7
Lines 305 307 +2
==========================================
+ Hits 286 291 +5
+ Misses 14 11 -3
Partials 5 5
Continue to review full report at Codecov.
|
It is so cool that you immediately realized how to apply here the change @jsign proposed. Love this! |
Thanks :-) We were already doing the suggested change (of celestiaorg/celestia-core#351) here. Only very recently (#38) we changed this for (#37). But yeah reviewing that code made me realize that our "bugfix" (quotes as the bug only happened during unit tests), wasn't the smartest one and we should have kept the existing code in favour of the fix here. Two low hanging fruits are:
|
865b05a
to
945e12f
Compare
Is this branch up-to-date against |
Yes, the force push was to rebase on master. |
After reviewing celestiaorg/celestia-core#351 I've realized that #38 introduced an unnecessary alloc per leaf and inner node.
This PR reverts the changes of #38, caches the root s.t. it only gets computed when necessary but keeps that test that aims to reproduce the issue in #37. (draft as I want to confirm this really does not re-introduce the issue in test withing ll-core, too celestiaorg/celestia-core@1522021)