Closed throughnothing closed 9 years ago
The connect event should likely have a separate test, as the "new addrs" test is only testing for handling of "addr" messages.
@braydonf yup, was already working on a better test, that will test peerready
, peerdisconnect
, and peerconnect
messages (all of which weren't really tested). Just pushed.
Interesting, I thought there may have been a test for disconnect, but it doesn't look like it. It should test to make sure that the peer has been removed from _connectedPeers
, but that can be done in another PR.
Good catch, updated.
LGTM
great contribution, thanks @throughnothing !
This could be useful to some consumers. I'm using it to detect nodes that are connected, but slow to respond with their
verack
commands, to disconnect these slow nodes and get different nodes in my pool.