p2p: flatten channel descriptor (#7132)

This commit is contained in:
Sam Kleinman
2021-10-15 13:03:10 -04:00
committed by GitHub
parent 0900ea8396
commit cbe6ad6cd5
20 changed files with 124 additions and 155 deletions
+8 -10
View File
@@ -27,16 +27,14 @@ var (
//
// TODO: Remove once p2p refactor is complete.
// ref: https://github.com/tendermint/tendermint/issues/5670
ChannelShims = map[p2p.ChannelID]*p2p.ChannelDescriptorShim{
BlockSyncChannel: {
Descriptor: &p2p.ChannelDescriptor{
ID: BlockSyncChannel,
MessageType: new(bcproto.Message),
Priority: 5,
SendQueueCapacity: 1000,
RecvBufferCapacity: 1024,
RecvMessageCapacity: MaxMsgSize,
},
ChannelShims = []*p2p.ChannelDescriptor{
{
ID: BlockSyncChannel,
MessageType: new(bcproto.Message),
Priority: 5,
SendQueueCapacity: 1000,
RecvBufferCapacity: 1024,
RecvMessageCapacity: MaxMsgSize,
},
}
)
+1 -1
View File
@@ -65,7 +65,7 @@ func setup(
blockSync: true,
}
chDesc := p2p.ChannelDescriptor{ID: BlockSyncChannel}
chDesc := &p2p.ChannelDescriptor{ID: BlockSyncChannel}
rts.blockSyncChannels = rts.network.MakeChannelsNoCleanup(t, chDesc, new(bcproto.Message), int(chBuf))
i := 0