-
Notifications
You must be signed in to change notification settings - Fork 324
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
implement isDelegate() in nodeinfo #3804
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3804 +/- ##
==========================================
+ Coverage 74.47% 75.39% +0.91%
==========================================
Files 269 303 +34
Lines 23925 25854 +1929
==========================================
+ Hits 17818 19492 +1674
- Misses 5174 5342 +168
- Partials 933 1020 +87
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
* implement nodinfo.isDelegate
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.
- bad namings like
GetNodeByAddr
. - as discussed, subscribe block may be a better solution
if !dm.delegateCache { | ||
if err := dm.updateDelegateCache(); err != nil { | ||
log.L().Error("nodeinfo manager update delegate cache failed", zap.Error(err)) | ||
} | ||
} | ||
return dm.delegateCache |
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.
after setting delegateCache
, a node will always be a delegate
, which is not true.
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.
same thought here. Read from block is a good solution
if !protocol.MustGetFeatureCtx(ctx).EnableNodeInfo { | ||
log.L().Debug("nodeinfo manager feature is disabled") | ||
return | ||
} |
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.
not a height dependent feature & should not be checked in the recurring task
Description
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: