p2p: NewMultiplexTransport takes an MConnConfig (#2869)

* p2p: NewMultiplexTransport takes an MConnConfig

* changelog

* move test func to test file
This commit is contained in:
Ethan Buchman
2018-11-17 03:16:49 -05:00
committed by GitHub
parent e6fc10faf6
commit 6168b404a7
7 changed files with 42 additions and 32 deletions

View File

@ -135,7 +135,7 @@ func (sw *Switch) addPeerWithConnection(conn net.Conn) error {
p := newPeer(
pc,
sw.mConfig,
MConnConfig(sw.config),
ni,
sw.reactorsByCh,
sw.chDescs,
@ -175,7 +175,7 @@ func MakeSwitch(
}
nodeInfo := testNodeInfo(nodeKey.ID(), fmt.Sprintf("node%d", i))
t := NewMultiplexTransport(nodeInfo, nodeKey)
t := NewMultiplexTransport(nodeInfo, nodeKey, MConnConfig(cfg))
addr := nodeInfo.NetAddress()
if err := t.Listen(*addr); err != nil {
@ -232,7 +232,6 @@ func testPeerConn(
// Only the information we already have
return peerConn{
config: cfg,
outbound: outbound,
persistent: persistent,
conn: conn,