-
Notifications
You must be signed in to change notification settings - Fork 471
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
Catchpoints: Small tweaks, mostly to comments #5195
Conversation
id: childNodeID, | ||
hashIndex: d[0], |
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.
FYI: This is because we write them in this order in all the nearby initializations.
Codecov Report
@@ Coverage Diff @@
## master #5195 +/- ##
==========================================
+ Coverage 53.55% 53.60% +0.05%
==========================================
Files 430 430
Lines 54085 54080 -5
==========================================
+ Hits 28966 28992 +26
+ Misses 22873 22848 -25
+ Partials 2246 2240 -6
... and 10 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -63,7 +63,7 @@ type Trie struct { | |||
root storedNodeIdentifier | |||
nextNodeID storedNodeIdentifier | |||
lastCommittedNodeID storedNodeIdentifier | |||
cache *merkleTrieCache | |||
cache merkleTrieCache |
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.
question: most of the changes in the PR that changes from mt.cache
to &mt.cache
are related with this line.
Is it because of memory management that we want to change from pointer to instance of cache?
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.
Yeah, it just didn't need to be a pointer, so I figured we'd avoid the allocation.
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.
Changes are fine but what is rationale going from pointer to a value for merkleTrieCache
?
It was just a pointless allocation. The pointed to thing is never assigned into another merkleTrieCache, so it might as well be embedded. |
I just added a couple more very safe typo changes. If anyone wants me to back out the pointer change, I will. I'm just trying neaten things up before I dig into performance for state commitments. |
Existing tests pass, very few code changes.