[consensus] print log when participants is empty

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3386/head
Leo Chen 4 years ago
parent 689a86f889
commit 1043207689
  1. 4
      consensus/consensus_service.go

@ -92,6 +92,10 @@ func (consensus *Consensus) UpdatePublicKeys(pubKeys []bls_cosi.PublicKeyWrapper
consensus.LeaderPubKey = &allKeys[0]
utils.Logger().Info().
Str("info", consensus.LeaderPubKey.Bytes.Hex()).Msg("My Leader")
} else {
utils.Logger().Error().
Msg("[UpdatePublicKeys] Participants is empty")
consensus.pubKeyLock.Unlock()
}
consensus.pubKeyLock.Unlock()
// reset states after update public keys

Loading…
Cancel
Save