bitcoin-net icon indicating copy to clipboard operation
bitcoin-net copied to clipboard

Several peers created for one webSeed

Open dimxy opened this issue 5 years ago • 0 comments

Issue: when only one webSeed url and only one p2p peer is set several peer objects are created sending over one websockets object resulting in repeated request rejects from the p2p peer.
The situation shows itself as several 'version' messages are sent by each peer over the same single websocket connection so the chain node accepts only first version and rejects subsequent and the client prints bitcoin-net:peergroup peer connection error: Peer handshake timed out messages in console.
In the browser debug I could see that WebSocketStream() function, creating the ws object, is called only once but PeerGroup _OnConnection(), creating peers, is called three times. It looks like we have 3 peers but only one ws object resulting in mixing up exchanges with the chain node

dimxy avatar Oct 22 '20 17:10 dimxy