Browse Source

p2p: Fix "Unknown Channel" bug on CustomReactors (#6297)

pull/6315/head
Gustavo Chaín 4 years ago
committed by GitHub
parent
commit
c9966cd6be
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions
  1. +1
    -0
      CHANGELOG_PENDING.md
  2. +6
    -1
      p2p/peer.go

+ 1
- 0
CHANGELOG_PENDING.md View File

@ -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)

+ 6
- 1
p2p/peer.go View File

@ -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(),


Loading…
Cancel
Save