remove duplicated bitmap key set in updatepublickey function

pull/1176/head
chao 5 years ago committed by chaosma
parent da6a4f017f
commit 100d7154f6
  1. 9
      consensus/consensus_service.go

@ -179,15 +179,6 @@ func (consensus *Consensus) UpdatePublicKeys(pubKeys []*bls.PublicKey) int {
// TODO: use pubkey to identify leader rather than p2p.Peer.
consensus.leader = p2p.Peer{ConsensusPubKey: pubKeys[0]}
consensus.LeaderPubKey = pubKeys[0]
prepareBitmap, err := bls_cosi.NewMask(consensus.PublicKeys, consensus.LeaderPubKey)
if err == nil {
consensus.prepareBitmap = prepareBitmap
}
commitBitmap, err := bls_cosi.NewMask(consensus.PublicKeys, consensus.leader.ConsensusPubKey)
if err == nil {
consensus.commitBitmap = commitBitmap
}
utils.GetLogInstance().Info("My Leader", "info", consensus.LeaderPubKey.SerializeToHexStr())
consensus.pubKeyLock.Unlock()

Loading…
Cancel
Save