Skip to content

Commit

Permalink
Ignore channel double creation during replication.
Browse files Browse the repository at this point in the history
fix #2931

Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
(cherry picked from commit 434a8d7)
  • Loading branch information
guoger authored and ale-linux committed Mar 16, 2022
1 parent 458345a commit 0396bf9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions orderer/common/cluster/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0396bf9

Please sign in to comment.