mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-20 22:26:15 +00:00
+4
-4
@@ -169,15 +169,15 @@ func MakeSwitch(
|
||||
logger := log.TestingLogger().With("switch", i)
|
||||
t := NewMConnTransport(logger, nodeInfo, nodeKey.PrivKey, MConnConfig(cfg))
|
||||
|
||||
if err := t.Listen(addr.Endpoint()); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// TODO: let the config be passed in?
|
||||
sw := initSwitch(i, NewSwitch(cfg, t, opts...))
|
||||
sw.SetLogger(log.TestingLogger().With("switch", i))
|
||||
sw.SetNodeKey(nodeKey)
|
||||
|
||||
if err := t.Listen(addr.Endpoint()); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
ni := nodeInfo
|
||||
ni.Channels = []byte{}
|
||||
for ch := range sw.reactorsByCh {
|
||||
|
||||
@@ -129,6 +129,11 @@ func NewMConnTransport(
|
||||
}
|
||||
|
||||
// SetChannelDescriptors implements Transport.
|
||||
//
|
||||
// This is not concurrency-safe, and must be called before listening.
|
||||
//
|
||||
// FIXME: This is here for compatibility with existing switch code,
|
||||
// it should be passed via the constructor instead.
|
||||
func (m *MConnTransport) SetChannelDescriptors(chDescs []*conn.ChannelDescriptor) {
|
||||
m.channelDescs = chDescs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user