server: remove peer from SyncManager on VerAckReceived

Peers are now added to the SyncManager if we receive their verack, but
we'd still attempt to remove them from the SyncManager if we didn't
receive it.
This commit is contained in:
Wilmer Paulino 2019-10-29 19:38:38 -07:00
parent a41498d578
commit bc21593480
No known key found for this signature in database
GPG key ID: 6DF57B9F9514972F

View file

@ -2058,7 +2058,7 @@ func (s *server) peerDoneHandler(sp *serverPeer) {
s.donePeers <- sp
// Only tell sync manager we are gone if we ever told it we existed.
if sp.VersionKnown() {
if sp.VerAckReceived() {
s.syncManager.DonePeer(sp.Peer)
// Evict any remaining orphans that were sent by the peer.