Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spv: Disconnect from straggler peers
This adds a function to force disconnection from peers that have been overtaken by the wallet. During initial sync, we might connect to a peer that is useful during the earlier block ranges but which is overtaken due to the wallet connecting to peers with more up to date blocks. After initial sync completes and the sendheaders message is sent, the remote peers should be announcing new blocks via headers message. If a particular peer don't send any headers after the wallet has received several new headers, it probably means that peer has poor connectivity to the network and should be disconnected in favor of attempting to find a better peer.
- Loading branch information