-
Notifications
You must be signed in to change notification settings - Fork 130
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
chore(lib/blocktree): replace sync.Map
with mutex protected map
#2285
Conversation
Codecov Report
@@ Coverage Diff @@
## development #2285 +/- ##
===============================================
+ Coverage 57.58% 57.63% +0.04%
===============================================
Files 211 212 +1
Lines 27906 27922 +16
===============================================
+ Hits 16070 16092 +22
+ Misses 10207 10199 -8
- Partials 1629 1631 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
sync.Map
with map+mutexsync.Map
with mutex protected map
abaff34
to
61fdb65
Compare
lib/blocktree/hashtoinstance.go
Outdated
"github.com/ChainSafe/gossamer/lib/runtime" | ||
) | ||
|
||
type hashToInstance struct { |
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.
type hashToInstance struct { | |
type hashToRuntimeInstance struct { |
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.
Renaming it to hashToRuntime
it makes more sense I think (and also is shorter)
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.
🎉
61fdb65
to
56826d9
Compare
Changes
runtime.Instance
runtime
->runtimes
inBlockTree
since it's a mapping from hash to runtime instance, not just a single runtimeTests
Issues
sync.Map
#2281Primary Reviewer