Anton Kaliaev
bcf10d5bae
p2p: peer state init too late and pex message too soon (#3634)
* fix peer state init to late Peer does not have a state yet. We set it in AddPeer. We need an new interface before mconnection is started * pex message to soon fix reconnection pex send too fast, error is caused lastReceivedRequests is still not deleted when a peer reconnected * add test case for initpeer * add prove case * remove potentially infinite loop * Update consensus/reactor.go Co-Authored-By: guagualvcha <baifudong@lancai.cn> * Update consensus/reactor_test.go Co-Authored-By: guagualvcha <baifudong@lancai.cn> * document Reactor interface better * refactor TestReactorReceiveDoesNotPanicIfAddPeerHasntBeenCalledYet * fix merge conflicts * blockchain: remove peer's ID from the pool in InitPeer Refs #3338 * pex: resetPeersRequestsInfo both upon InitPeer and RemovePeer * ensure RemovePeer is always called before InitPeer by removing the peer from the switch last (after we've stopped it and removed from all reactors) * add some comments for ConsensusReactor#InitPeer * fix pex reactor * format code * fix spelling * update changelog * remove unused methods * do not clear lastReceivedRequests upon error only in RemovePeer * call InitPeer before we start the peer! * add a comment to InitPeer * write a test * use waitUntilSwitchHasAtLeastNPeers func * bring back timeouts * Test to ensure Receive panics if InitPeer has not been called |
6 years ago | |
---|---|---|
.. | ||
addrbook.go | Bring back NodeInfo NetAddress form the dead (#3545) | 6 years ago |
addrbook_test.go | Bring back NodeInfo NetAddress form the dead (#3545) | 6 years ago |
errors.go | p2p: do not log err if peer is private (#3474) | 6 years ago |
file.go | libs/common: remove deprecated PanicXXX functions (#3595) | 6 years ago |
known_address.go | p2p: seed mode refactoring (#3011) | 6 years ago |
params.go | fix build and test | 7 years ago |
pex_reactor.go | p2p: peer state init too late and pex message too soon (#3634) | 6 years ago |
pex_reactor_test.go | p2p: peer state init too late and pex message too soon (#3634) | 6 years ago |
wire.go | alias amino imports (#3219) | 6 years ago |