OpenBazaar/spvwallet

Bug: peer can be chosen as download peer before version messages are exchanged.

Closed this issue · 1 comments

If there is a download peer that is disconnected, then spvwallet chooses a different peer from PeerManager.connectedPeers to be the new download peer. However, connectedPeers can include peers that haven't exchanged version messages. That means that spvwallet sends the peer a message too early and the peer disconnects it.

Good catch.