-
Notifications
You must be signed in to change notification settings - Fork 156
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
spv: After losing all peers synced
is never true.
#2464
Comments
I'm sure @jrick will know better since he's far more familiar with this code and works on it, but I imagine it has to wait for a new block to know it's synced again. Did you wait long enough to know if that's the case or not? |
Yes. I have waited a few blocks. The change in block number is reflected in |
synced
is never true.synced
is never true.
Yeah, I can see how this is occurring. The SPV syncer never does complete teardown (where the main package could recreate the syncer all over again in a loop) when all peers are lost. This is indicative of a larger issue in this design: we almost certainly want to treat reconnection after all peers drop the same as initial sync, but we only perform initial sync once per syncer instance. I think tearing down the entire syncer (with Run() returning an error) is the best way to work around this problem. |
Please test #2465 to see if it fixes this issue. I believe this should also fix the cpu spinning as well. |
After losing all peers, even if you get them back,
synced
from the rpc commandsyncstatus
never becomes true.Can be seen on mainnet:
syncstatus
returns true forsynced
turn off your internet.getpeerinfo
to return an empty list.syncstatus
after getting peers back and waiting a bit.Also, if you have logs on trace when turning off peers, you will see the spinning described in #2433
The text was updated successfully, but these errors were encountered: