-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: remove unnecessary empty Trie
initialization
#2840
feat: remove unnecessary empty Trie
initialization
#2840
Conversation
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
|
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.
LG.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2840 +/- ##
==========================================
+ Coverage 80.14% 81.19% +1.05%
==========================================
Files 30 46 +16
Lines 2709 3403 +694
Branches 582 712 +130
==========================================
+ Hits 2171 2763 +592
- Misses 344 415 +71
- Partials 194 225 +31
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
The empty trie root hash can be defined as constant because it can't be changed so there is no actual gain in performance or code readability. The initialization of an empty trie here can be deprecated and replaced with a constant variable.
Solution:
Remove the initialization here and define a new constant that wraps an empty trie root hash.
Related issue(s):
Fixes #2839
Notes for reviewer:
Checklist