diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 144f7112a..7d63fba03 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -28,3 +28,4 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi ### BUG FIXES - [rpc/jsonrpc/server] \#6191 Correctly unmarshal `RPCRequest` when data is `null` (@melekes) +- [p2p] \#6289 Fix "unknown channels" bug on CustomReactors (@gchaincl) diff --git a/p2p/peer.go b/p2p/peer.go index 36db3d728..c7a0b3525 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -130,10 +130,15 @@ func newPeer( onPeerError func(Peer, interface{}), options ...PeerOption, ) *peer { + var channs = make([]byte, 0, len(chDescs)) + for _, desc := range chDescs { + channs = append(channs, desc.ID) + } + p := &peer{ peerConn: pc, nodeInfo: nodeInfo, - channels: nodeInfo.(DefaultNodeInfo).Channels, // TODO + channels: channs, Data: cmap.NewCMap(), metricsTicker: time.NewTicker(metricsTickerDuration), metrics: NopMetrics(),