-
Notifications
You must be signed in to change notification settings - Fork 303
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
alter ActiveP2pNetwork concept of close to in sync #8853
alter ActiveP2pNetwork concept of close to in sync #8853
Conversation
- `isInSync` is often set when there's no other peers to sync to so its not a great measure - moved the isCloseToInSync into recentChaindata Signed-off-by: Paul Harris <[email protected]>
Signed-off-by: Paul Harris <[email protected]>
i've done a few syncs on different networks, and its behaving as I expect, ready to review. |
I think we need |
@rolfyone pushed a commit to cover the condition i was mentioning. |
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.
maybe we could provide isCloseToInSync
on the onSyncStateChanged
method, instead of isInSync
. The consumer doesn't get much value by just receiving that event and most likely need to call recenChainData to get the info. Doing that we could avoid multiple calls (for each subscriber) to recentChainData (and also avoid subscriber to require recenChainData dep injection)
isInSync
is often set when there's no other peers to sync to so its not a great measuremoved the isCloseToInSync into recentChaindata
Documentation
doc-change-required
label to this PR if updates are required.Changelog