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 <mayro1595@gmail.com>
  • Loading branch information
MayRosenbaum committed May 5, 2024
1 parent 53d9316 commit 5cb9196
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 5cb9196

Please sign in to comment.