2018-06-20 17:35:30 -07:00
|
|
|
package p2p
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net"
|
2018-09-18 22:14:40 +02:00
|
|
|
"time"
|
2018-06-20 17:35:30 -07:00
|
|
|
|
2019-08-08 12:31:13 +02:00
|
|
|
"github.com/pkg/errors"
|
|
|
|
|
2018-11-28 11:53:04 -08:00
|
|
|
"github.com/tendermint/tendermint/crypto"
|
2018-07-18 08:38:44 -07:00
|
|
|
"github.com/tendermint/tendermint/crypto/ed25519"
|
2018-07-01 22:36:49 -04:00
|
|
|
cmn "github.com/tendermint/tendermint/libs/common"
|
|
|
|
"github.com/tendermint/tendermint/libs/log"
|
2018-06-20 17:35:30 -07:00
|
|
|
|
|
|
|
"github.com/tendermint/tendermint/config"
|
|
|
|
"github.com/tendermint/tendermint/p2p/conn"
|
|
|
|
)
|
|
|
|
|
2018-10-12 19:25:33 -04:00
|
|
|
const testCh = 0x01
|
|
|
|
|
|
|
|
//------------------------------------------------
|
|
|
|
|
|
|
|
type mockNodeInfo struct {
|
|
|
|
addr *NetAddress
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ni mockNodeInfo) ID() ID { return ni.addr.ID }
|
2019-04-12 12:31:02 +02:00
|
|
|
func (ni mockNodeInfo) NetAddress() (*NetAddress, error) { return ni.addr, nil }
|
2018-12-16 09:27:16 -08:00
|
|
|
func (ni mockNodeInfo) Validate() error { return nil }
|
2018-10-12 19:25:33 -04:00
|
|
|
func (ni mockNodeInfo) CompatibleWith(other NodeInfo) error { return nil }
|
|
|
|
|
2019-05-28 03:39:58 +09:00
|
|
|
func AddPeerToSwitchPeerSet(sw *Switch, peer Peer) {
|
2018-06-20 17:35:30 -07:00
|
|
|
sw.peers.Add(peer)
|
|
|
|
}
|
|
|
|
|
|
|
|
func CreateRandomPeer(outbound bool) *peer {
|
|
|
|
addr, netAddr := CreateRoutableAddr()
|
|
|
|
p := &peer{
|
|
|
|
peerConn: peerConn{
|
2019-04-01 19:59:57 -04:00
|
|
|
outbound: outbound,
|
|
|
|
socketAddr: netAddr,
|
2018-06-20 17:35:30 -07:00
|
|
|
},
|
2018-10-12 19:25:33 -04:00
|
|
|
nodeInfo: mockNodeInfo{netAddr},
|
|
|
|
mconn: &conn.MConnection{},
|
|
|
|
metrics: NopMetrics(),
|
2018-06-20 17:35:30 -07:00
|
|
|
}
|
|
|
|
p.SetLogger(log.TestingLogger().With("peer", addr))
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func CreateRoutableAddr() (addr string, netAddr *NetAddress) {
|
|
|
|
for {
|
|
|
|
var err error
|
2018-08-10 00:25:57 -05:00
|
|
|
addr = fmt.Sprintf("%X@%v.%v.%v.%v:26656", cmn.RandBytes(20), cmn.RandInt()%256, cmn.RandInt()%256, cmn.RandInt()%256, cmn.RandInt()%256)
|
2018-06-20 17:35:30 -07:00
|
|
|
netAddr, err = NewNetAddressString(addr)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
if netAddr.Routable() {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
// Connects switches via arbitrary net.Conn. Used for testing.
|
|
|
|
|
|
|
|
const TEST_HOST = "localhost"
|
|
|
|
|
|
|
|
// MakeConnectedSwitches returns n switches, connected according to the connect func.
|
|
|
|
// If connect==Connect2Switches, the switches will be fully connected.
|
|
|
|
// initSwitch defines how the i'th switch should be initialized (ie. with what reactors).
|
|
|
|
// NOTE: panics if any switch fails to start.
|
|
|
|
func MakeConnectedSwitches(cfg *config.P2PConfig, n int, initSwitch func(int, *Switch) *Switch, connect func([]*Switch, int, int)) []*Switch {
|
|
|
|
switches := make([]*Switch, n)
|
|
|
|
for i := 0; i < n; i++ {
|
|
|
|
switches[i] = MakeSwitch(cfg, i, TEST_HOST, "123.123.123", initSwitch)
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := StartSwitches(switches); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
for i := 0; i < n; i++ {
|
|
|
|
for j := i + 1; j < n; j++ {
|
|
|
|
connect(switches, i, j)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return switches
|
|
|
|
}
|
|
|
|
|
|
|
|
// Connect2Switches will connect switches i and j via net.Pipe().
|
|
|
|
// Blocks until a connection is established.
|
|
|
|
// NOTE: caller ensures i and j are within bounds.
|
|
|
|
func Connect2Switches(switches []*Switch, i, j int) {
|
|
|
|
switchI := switches[i]
|
|
|
|
switchJ := switches[j]
|
|
|
|
|
|
|
|
c1, c2 := conn.NetPipe()
|
|
|
|
|
|
|
|
doneCh := make(chan struct{})
|
|
|
|
go func() {
|
|
|
|
err := switchI.addPeerWithConnection(c1)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
doneCh <- struct{}{}
|
|
|
|
}()
|
|
|
|
go func() {
|
|
|
|
err := switchJ.addPeerWithConnection(c2)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
doneCh <- struct{}{}
|
|
|
|
}()
|
|
|
|
<-doneCh
|
|
|
|
<-doneCh
|
|
|
|
}
|
|
|
|
|
|
|
|
func (sw *Switch) addPeerWithConnection(conn net.Conn) error {
|
2018-09-18 22:14:40 +02:00
|
|
|
pc, err := testInboundPeerConn(conn, sw.config, sw.nodeKey.PrivKey)
|
2018-06-20 17:35:30 -07:00
|
|
|
if err != nil {
|
|
|
|
if err := conn.Close(); err != nil {
|
|
|
|
sw.Logger.Error("Error closing connection", "err", err)
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
2018-09-18 22:14:40 +02:00
|
|
|
|
2019-02-06 10:24:43 -05:00
|
|
|
ni, err := handshake(conn, time.Second, sw.nodeInfo)
|
2018-09-18 22:14:40 +02:00
|
|
|
if err != nil {
|
|
|
|
if err := conn.Close(); err != nil {
|
|
|
|
sw.Logger.Error("Error closing connection", "err", err)
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
p := newPeer(
|
|
|
|
pc,
|
2018-11-17 03:16:49 -05:00
|
|
|
MConnConfig(sw.config),
|
2018-09-18 22:14:40 +02:00
|
|
|
ni,
|
|
|
|
sw.reactorsByCh,
|
|
|
|
sw.chDescs,
|
|
|
|
sw.StopPeerForError,
|
|
|
|
)
|
|
|
|
|
|
|
|
if err = sw.addPeer(p); err != nil {
|
2018-06-20 17:35:30 -07:00
|
|
|
pc.CloseConn()
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// StartSwitches calls sw.Start() for each given switch.
|
|
|
|
// It returns the first encountered error.
|
|
|
|
func StartSwitches(switches []*Switch) error {
|
|
|
|
for _, s := range switches {
|
|
|
|
err := s.Start() // start switch and reactors
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-09-18 22:14:40 +02:00
|
|
|
func MakeSwitch(
|
|
|
|
cfg *config.P2PConfig,
|
|
|
|
i int,
|
|
|
|
network, version string,
|
|
|
|
initSwitch func(int, *Switch) *Switch,
|
|
|
|
opts ...SwitchOption,
|
|
|
|
) *Switch {
|
|
|
|
|
2018-10-12 19:25:33 -04:00
|
|
|
nodeKey := NodeKey{
|
|
|
|
PrivKey: ed25519.GenPrivKey(),
|
2018-06-20 17:35:30 -07:00
|
|
|
}
|
2018-10-12 19:25:33 -04:00
|
|
|
nodeInfo := testNodeInfo(nodeKey.ID(), fmt.Sprintf("node%d", i))
|
2019-04-01 19:59:57 -04:00
|
|
|
addr, err := NewNetAddressString(
|
|
|
|
IDAddressString(nodeKey.ID(), nodeInfo.(DefaultNodeInfo).ListenAddr),
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2018-09-18 22:14:40 +02:00
|
|
|
|
2018-11-17 03:16:49 -05:00
|
|
|
t := NewMultiplexTransport(nodeInfo, nodeKey, MConnConfig(cfg))
|
2018-09-18 22:14:40 +02:00
|
|
|
|
|
|
|
if err := t.Listen(*addr); err != nil {
|
|
|
|
panic(err)
|
2018-06-20 17:35:30 -07:00
|
|
|
}
|
2018-09-18 22:14:40 +02:00
|
|
|
|
|
|
|
// TODO: let the config be passed in?
|
|
|
|
sw := initSwitch(i, NewSwitch(cfg, t, opts...))
|
2018-12-05 07:32:27 -05:00
|
|
|
sw.SetLogger(log.TestingLogger().With("switch", i))
|
2018-09-18 22:14:40 +02:00
|
|
|
sw.SetNodeKey(&nodeKey)
|
|
|
|
|
2018-10-12 19:25:33 -04:00
|
|
|
ni := nodeInfo.(DefaultNodeInfo)
|
2018-06-20 17:35:30 -07:00
|
|
|
for ch := range sw.reactorsByCh {
|
|
|
|
ni.Channels = append(ni.Channels, ch)
|
|
|
|
}
|
2018-10-12 19:25:33 -04:00
|
|
|
nodeInfo = ni
|
2018-09-18 22:14:40 +02:00
|
|
|
|
|
|
|
// TODO: We need to setup reactors ahead of time so the NodeInfo is properly
|
|
|
|
// populated and we don't have to do those awkward overrides and setters.
|
2018-10-12 19:25:33 -04:00
|
|
|
t.nodeInfo = nodeInfo
|
|
|
|
sw.SetNodeInfo(nodeInfo)
|
2018-09-18 22:14:40 +02:00
|
|
|
|
2018-06-20 17:35:30 -07:00
|
|
|
return sw
|
|
|
|
}
|
2018-09-18 22:14:40 +02:00
|
|
|
|
|
|
|
func testInboundPeerConn(
|
|
|
|
conn net.Conn,
|
|
|
|
config *config.P2PConfig,
|
|
|
|
ourNodePrivKey crypto.PrivKey,
|
|
|
|
) (peerConn, error) {
|
2018-10-18 18:26:32 -04:00
|
|
|
return testPeerConn(conn, config, false, false, ourNodePrivKey, nil)
|
2018-09-18 22:14:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func testPeerConn(
|
|
|
|
rawConn net.Conn,
|
|
|
|
cfg *config.P2PConfig,
|
|
|
|
outbound, persistent bool,
|
|
|
|
ourNodePrivKey crypto.PrivKey,
|
2019-04-01 19:59:57 -04:00
|
|
|
socketAddr *NetAddress,
|
2018-09-18 22:14:40 +02:00
|
|
|
) (pc peerConn, err error) {
|
|
|
|
conn := rawConn
|
|
|
|
|
|
|
|
// Fuzz connection
|
|
|
|
if cfg.TestFuzz {
|
|
|
|
// so we have time to do peer handshakes and get set up
|
|
|
|
conn = FuzzConnAfterFromConfig(conn, 10*time.Second, cfg.TestFuzzConfig)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Encrypt connection
|
|
|
|
conn, err = upgradeSecretConn(conn, cfg.HandshakeTimeout, ourNodePrivKey)
|
|
|
|
if err != nil {
|
2019-08-08 12:31:13 +02:00
|
|
|
return pc, errors.Wrap(err, "Error creating peer")
|
2018-09-18 22:14:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Only the information we already have
|
2019-04-01 19:59:57 -04:00
|
|
|
return newPeerConn(outbound, persistent, conn, socketAddr), nil
|
2018-09-18 22:14:40 +02:00
|
|
|
}
|
2018-10-12 19:25:33 -04:00
|
|
|
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
// rand node info
|
|
|
|
|
|
|
|
func testNodeInfo(id ID, name string) NodeInfo {
|
|
|
|
return testNodeInfoWithNetwork(id, name, "testing")
|
|
|
|
}
|
|
|
|
|
|
|
|
func testNodeInfoWithNetwork(id ID, name, network string) NodeInfo {
|
|
|
|
return DefaultNodeInfo{
|
2018-10-22 17:55:49 -04:00
|
|
|
ProtocolVersion: defaultProtocolVersion,
|
2018-10-18 10:29:59 -04:00
|
|
|
ID_: id,
|
2019-02-06 10:14:03 -05:00
|
|
|
ListenAddr: fmt.Sprintf("127.0.0.1:%d", getFreePort()),
|
2018-10-18 10:29:59 -04:00
|
|
|
Network: network,
|
|
|
|
Version: "1.2.3-rc0-deadbeef",
|
|
|
|
Channels: []byte{testCh},
|
|
|
|
Moniker: name,
|
|
|
|
Other: DefaultNodeInfoOther{
|
|
|
|
TxIndex: "on",
|
2019-02-06 10:14:03 -05:00
|
|
|
RPCAddress: fmt.Sprintf("127.0.0.1:%d", getFreePort()),
|
2018-10-18 10:29:59 -04:00
|
|
|
},
|
2018-10-12 19:25:33 -04:00
|
|
|
}
|
|
|
|
}
|
p2p: file descriptor leaks (#3150)
* close peer's connection to avoid fd leak
Fixes #2967
* rename peer#Addr to RemoteAddr
* fix test
* fixes after Ethan's review
* bring back the check
* changelog entry
* write a test for switch#acceptRoutine
* increase timeouts? :(
* remove extra assertNPeersWithTimeout
* simplify test
* assert number of peers (just to be safe)
* Cleanup in OnStop
* run tests with verbose flag on CircleCI
* spawn a reading routine to prevent connection from closing
* get port from the listener
random port is faster, but often results in
```
panic: listen tcp 127.0.0.1:44068: bind: address already in use [recovered]
panic: listen tcp 127.0.0.1:44068: bind: address already in use
goroutine 79 [running]:
testing.tRunner.func1(0xc0001bd600)
/usr/local/go/src/testing/testing.go:792 +0x387
panic(0x974d20, 0xc0001b0500)
/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/tendermint/tendermint/p2p.MakeSwitch(0xc0000f42a0, 0x0, 0x9fb9cc, 0x9, 0x9fc346, 0xb, 0xb42128, 0x0, 0x0, 0x0, ...)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:182 +0xa28
github.com/tendermint/tendermint/p2p.MakeConnectedSwitches(0xc0000f42a0, 0x2, 0xb42128, 0xb41eb8, 0x4f1205, 0xc0001bed80, 0x4f16ed)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:75 +0xf9
github.com/tendermint/tendermint/p2p.MakeSwitchPair(0xbb8d20, 0xc0001bd600, 0xb42128, 0x2f7, 0x4f16c0)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:94 +0x4c
github.com/tendermint/tendermint/p2p.TestSwitches(0xc0001bd600)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:117 +0x58
testing.tRunner(0xc0001bd600, 0xb42038)
/usr/local/go/src/testing/testing.go:827 +0xbf
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:878 +0x353
exit status 2
FAIL github.com/tendermint/tendermint/p2p 0.350s
```
2019-01-22 22:23:18 +04:00
|
|
|
|
2019-02-06 10:14:03 -05:00
|
|
|
func getFreePort() int {
|
|
|
|
port, err := cmn.GetFreePort()
|
p2p: file descriptor leaks (#3150)
* close peer's connection to avoid fd leak
Fixes #2967
* rename peer#Addr to RemoteAddr
* fix test
* fixes after Ethan's review
* bring back the check
* changelog entry
* write a test for switch#acceptRoutine
* increase timeouts? :(
* remove extra assertNPeersWithTimeout
* simplify test
* assert number of peers (just to be safe)
* Cleanup in OnStop
* run tests with verbose flag on CircleCI
* spawn a reading routine to prevent connection from closing
* get port from the listener
random port is faster, but often results in
```
panic: listen tcp 127.0.0.1:44068: bind: address already in use [recovered]
panic: listen tcp 127.0.0.1:44068: bind: address already in use
goroutine 79 [running]:
testing.tRunner.func1(0xc0001bd600)
/usr/local/go/src/testing/testing.go:792 +0x387
panic(0x974d20, 0xc0001b0500)
/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/tendermint/tendermint/p2p.MakeSwitch(0xc0000f42a0, 0x0, 0x9fb9cc, 0x9, 0x9fc346, 0xb, 0xb42128, 0x0, 0x0, 0x0, ...)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:182 +0xa28
github.com/tendermint/tendermint/p2p.MakeConnectedSwitches(0xc0000f42a0, 0x2, 0xb42128, 0xb41eb8, 0x4f1205, 0xc0001bed80, 0x4f16ed)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:75 +0xf9
github.com/tendermint/tendermint/p2p.MakeSwitchPair(0xbb8d20, 0xc0001bd600, 0xb42128, 0x2f7, 0x4f16c0)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:94 +0x4c
github.com/tendermint/tendermint/p2p.TestSwitches(0xc0001bd600)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:117 +0x58
testing.tRunner(0xc0001bd600, 0xb42038)
/usr/local/go/src/testing/testing.go:827 +0xbf
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:878 +0x353
exit status 2
FAIL github.com/tendermint/tendermint/p2p 0.350s
```
2019-01-22 22:23:18 +04:00
|
|
|
if err != nil {
|
2019-02-06 10:14:03 -05:00
|
|
|
panic(err)
|
p2p: file descriptor leaks (#3150)
* close peer's connection to avoid fd leak
Fixes #2967
* rename peer#Addr to RemoteAddr
* fix test
* fixes after Ethan's review
* bring back the check
* changelog entry
* write a test for switch#acceptRoutine
* increase timeouts? :(
* remove extra assertNPeersWithTimeout
* simplify test
* assert number of peers (just to be safe)
* Cleanup in OnStop
* run tests with verbose flag on CircleCI
* spawn a reading routine to prevent connection from closing
* get port from the listener
random port is faster, but often results in
```
panic: listen tcp 127.0.0.1:44068: bind: address already in use [recovered]
panic: listen tcp 127.0.0.1:44068: bind: address already in use
goroutine 79 [running]:
testing.tRunner.func1(0xc0001bd600)
/usr/local/go/src/testing/testing.go:792 +0x387
panic(0x974d20, 0xc0001b0500)
/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/tendermint/tendermint/p2p.MakeSwitch(0xc0000f42a0, 0x0, 0x9fb9cc, 0x9, 0x9fc346, 0xb, 0xb42128, 0x0, 0x0, 0x0, ...)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:182 +0xa28
github.com/tendermint/tendermint/p2p.MakeConnectedSwitches(0xc0000f42a0, 0x2, 0xb42128, 0xb41eb8, 0x4f1205, 0xc0001bed80, 0x4f16ed)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:75 +0xf9
github.com/tendermint/tendermint/p2p.MakeSwitchPair(0xbb8d20, 0xc0001bd600, 0xb42128, 0x2f7, 0x4f16c0)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:94 +0x4c
github.com/tendermint/tendermint/p2p.TestSwitches(0xc0001bd600)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:117 +0x58
testing.tRunner(0xc0001bd600, 0xb42038)
/usr/local/go/src/testing/testing.go:827 +0xbf
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:878 +0x353
exit status 2
FAIL github.com/tendermint/tendermint/p2p 0.350s
```
2019-01-22 22:23:18 +04:00
|
|
|
}
|
2019-02-06 10:14:03 -05:00
|
|
|
return port
|
p2p: file descriptor leaks (#3150)
* close peer's connection to avoid fd leak
Fixes #2967
* rename peer#Addr to RemoteAddr
* fix test
* fixes after Ethan's review
* bring back the check
* changelog entry
* write a test for switch#acceptRoutine
* increase timeouts? :(
* remove extra assertNPeersWithTimeout
* simplify test
* assert number of peers (just to be safe)
* Cleanup in OnStop
* run tests with verbose flag on CircleCI
* spawn a reading routine to prevent connection from closing
* get port from the listener
random port is faster, but often results in
```
panic: listen tcp 127.0.0.1:44068: bind: address already in use [recovered]
panic: listen tcp 127.0.0.1:44068: bind: address already in use
goroutine 79 [running]:
testing.tRunner.func1(0xc0001bd600)
/usr/local/go/src/testing/testing.go:792 +0x387
panic(0x974d20, 0xc0001b0500)
/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/tendermint/tendermint/p2p.MakeSwitch(0xc0000f42a0, 0x0, 0x9fb9cc, 0x9, 0x9fc346, 0xb, 0xb42128, 0x0, 0x0, 0x0, ...)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:182 +0xa28
github.com/tendermint/tendermint/p2p.MakeConnectedSwitches(0xc0000f42a0, 0x2, 0xb42128, 0xb41eb8, 0x4f1205, 0xc0001bed80, 0x4f16ed)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/test_util.go:75 +0xf9
github.com/tendermint/tendermint/p2p.MakeSwitchPair(0xbb8d20, 0xc0001bd600, 0xb42128, 0x2f7, 0x4f16c0)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:94 +0x4c
github.com/tendermint/tendermint/p2p.TestSwitches(0xc0001bd600)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch_test.go:117 +0x58
testing.tRunner(0xc0001bd600, 0xb42038)
/usr/local/go/src/testing/testing.go:827 +0xbf
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:878 +0x353
exit status 2
FAIL github.com/tendermint/tendermint/p2p 0.350s
```
2019-01-22 22:23:18 +04:00
|
|
|
}
|