Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Request more p2p addrs after peer checks
If the height or required services is deemed insufficient after the connection handshake, do not request more addresses right away, waiting for its response before killing the TCP connection. This stops ConnectOutbound from returning early with error while the TCP connection is still active, and causing the SPV syncer to begin connecting to more remote peers. While the SPV syncer remains limited to 8 total outbound managed peers, the total count of TCP connections can easily exceed this, and has been observed to max out the circuit limit on Tor proxies. Although this appears to move the address requesting to the foreground of ConnectOutbound, it only writes the getaddr message. addr message replies are handled internally by the RemotePeer.
- Loading branch information