-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fastsync/rpc: add TotalSyncedTime & RemainingTime to SyncInfo in /status RPC #6620
fastsync/rpc: add TotalSyncedTime & RemainingTime to SyncInfo in /status RPC #6620
Conversation
286514f
to
f273668
Compare
Codecov Report
@@ Coverage Diff @@
## master #6620 +/- ##
==========================================
- Coverage 65.99% 60.92% -5.07%
==========================================
Files 234 297 +63
Lines 20269 28210 +7941
==========================================
+ Hits 13376 17187 +3811
- Misses 5825 9291 +3466
- Partials 1068 1732 +664
|
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.
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.
Looks good. Just a few tweaks
eb53e88
to
fb69406
Compare
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.
LGTM 👍 Thanks Jay
On a different node, do we want to look at the interplay between state sync and the SyncInfo
RPC response. Right now, there's no mention of state syncing in the query
I think it's a good idea. Should we make a different PR for addressing the state sync info? |
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.
This code seems decent, but I think there are some edge cases about nodes in different situations around some node configurations that I think are important to think about.
@JayT106 yes, sure, we can tackle that in a separate PR 👍 |
822e351
to
79340b6
Compare
|
||
import "testing" | ||
|
||
func TestDefaultValue(t *testing.T) { |
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.
I might also add a few tests that attempt to modify the structure a bunch of times from multiple threads, in a way that the race detector would catch. The interesting part of this type is that it's thread safe/atomic, not that it's a boolean, and it would be nice if the tests would help provide confidence there.
cbf899d
to
d270f0f
Compare
closes #3365 once #6619 merged