mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 20:21:56 +00:00
rpc: /dial_peers: only mark peers as persistent if flag is on (#3620)
## Description also handle errors from DialPeersAsync remove nil addr from log msg fix TestPEXReactorDoesNotDisconnectFromPersistentPeerInSeedMode This is a follow-up from #3593 (review) Fixes most of the #3617, except #3593 (comment) ## Commits * rpc: /dial_peers: only mark peers as persistent if flag is on also - handle errors from DialPeersAsync - remove nil addr from log msg - fix TestPEXReactorDoesNotDisconnectFromPersistentPeerInSeedMode This is a follow-up from https://github.com/tendermint/tendermint/pull/3593#pullrequestreview-233556909 * remove a call to AddPersistentPeers TestDialFail will trigger a reconnect
This commit is contained in:
@@ -410,7 +410,6 @@ func TestSwitchReconnectsToOutboundPersistentPeer(t *testing.T) {
|
||||
|
||||
err = sw.DialPeerWithAddress(rp.Addr())
|
||||
require.Nil(t, err)
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
require.NotNil(t, sw.Peers().Get(rp.ID()))
|
||||
|
||||
p := sw.Peers().List()[0]
|
||||
@@ -432,7 +431,7 @@ func TestSwitchReconnectsToOutboundPersistentPeer(t *testing.T) {
|
||||
defer rp.Stop()
|
||||
|
||||
conf := config.DefaultP2PConfig()
|
||||
conf.TestDialFail = true
|
||||
conf.TestDialFail = true // will trigger a reconnect
|
||||
err = sw.addOutboundPeerWithConfig(rp.Addr(), conf)
|
||||
require.NotNil(t, err)
|
||||
// DialPeerWithAddres - sw.peerConfig resets the dialer
|
||||
|
Reference in New Issue
Block a user