From 0396bf928709a434e4941ceccab497a5656fdb0e Mon Sep 17 00:00:00 2001 From: Jay Guo Date: Mon, 14 Mar 2022 14:32:00 +0800 Subject: [PATCH] Ignore channel double creation during replication. fix #2931 Signed-off-by: Jay Guo (cherry picked from commit 434a8d7f0a42ba562afb969f2fcd701f7e2a7412) --- orderer/common/cluster/replication.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/orderer/common/cluster/replication.go b/orderer/common/cluster/replication.go index 3105c33f407..0938cf6d977 100644 --- a/orderer/common/cluster/replication.go +++ b/orderer/common/cluster/replication.go @@ -565,6 +565,11 @@ func (ci *ChainInspector) Channels() []ChannelGenesisBlock { continue } + if _, exist := channels[channel]; exist { + ci.Logger.Warnf("Block %d attempts to create an existing channel [%s], ignore", seq, channel) + continue + } + ci.Logger.Info("Block", seq, "contains channel", channel) channels[channel] = ChannelGenesisBlock{ ChannelName: channel,