diff --git a/consensus/consensus.go b/consensus/consensus.go index 5a131fac5..a69bf941b 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -61,7 +61,6 @@ type Consensus struct { commitBitmap *bls_cosi.Mask multiSigBitmap *bls_cosi.Mask // Bitmap for parsing multisig bitmap from validators - multiSigMutex sync.RWMutex // Registry for services. registry *registry.Registry diff --git a/consensus/consensus_service.go b/consensus/consensus_service.go index 1844f2268..5534b9bc9 100644 --- a/consensus/consensus_service.go +++ b/consensus/consensus_service.go @@ -138,9 +138,8 @@ func (consensus *Consensus) UpdateBitmaps() { multiSigBitmap, _ := bls_cosi.NewMask(members, nil) consensus.prepareBitmap = prepareBitmap consensus.commitBitmap = commitBitmap - consensus.multiSigMutex.Lock() consensus.multiSigBitmap = multiSigBitmap - consensus.multiSigMutex.Unlock() + } // ResetState resets the state of the consensus diff --git a/consensus/fbft_log.go b/consensus/fbft_log.go index 1a5966572..dead27f1a 100644 --- a/consensus/fbft_log.go +++ b/consensus/fbft_log.go @@ -360,9 +360,7 @@ func (consensus *Consensus) ParseFBFTMessage(msg *msg_pb.Message) (*FBFTMessage, copy(pbftMsg.SenderPubkeys[0].Bytes[:], consensusMsg.SenderPubkey[:]) } else { // else, it should be a multi-key message where the bitmap is populated - consensus.multiSigMutex.RLock() pubKeys, err := consensus.multiSigBitmap.GetSignedPubKeysFromBitmap(pbftMsg.SenderPubkeyBitmap) - consensus.multiSigMutex.RUnlock() if err != nil { return nil, err }