Skip to content

Commit

Permalink
panic chain in case of an error
Browse files Browse the repository at this point in the history
Signed-off-by: May Rosenbaum <[email protected]>
  • Loading branch information
MayRosenbaum authored and denyeart committed Apr 18, 2024
1 parent daed258 commit 39068ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orderer/consensus/etcdraft/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1470,13 +1470,13 @@ func (c *Chain) ValidateConsensusMetadata(oldOrdererConfig, newOrdererConfig cha
// This is a migration, so we have to validate the config change and make sure that endpoints per org are configured
for _, org := range newOrdererConfig.Organizations() {
if len(org.Endpoints()) == 0 {
c.logger.Warnf("illegal orderer config detected during consensus metadata validation: endpoints of org %s are missing", org.Name())
c.logger.Panicf("illegal orderer config detected during consensus metadata validation: endpoints of org %s are missing", org.Name())
return errors.Errorf("illegal orderer config detected during consensus metadata validation: endpoints of org %s are missing", org.Name())
}
}
return nil
} else {
c.logger.Warnf("illegal consensus type detected during consensus metadata validation: %s", newOrdererConfig.ConsensusType())
c.logger.Panicf("illegal consensus type detected during consensus metadata validation: %s", newOrdererConfig.ConsensusType())
return errors.Errorf("illegal consensus type detected during consensus metadata validation: %s", newOrdererConfig.ConsensusType())

}
Expand Down

0 comments on commit 39068ab

Please sign in to comment.