Fix remove locks.

pull/4509/head
frozen 2 years ago committed by Casey Gardiner
parent ea0b97be64
commit 0ec4c81121
  1. 5
      consensus/consensus_service.go

@ -429,8 +429,9 @@ func (consensus *Consensus) UpdateConsensusInformation() Mode {
// IsLeader check if the node is a leader or not by comparing the public key of
// the node with the leader public key
func (consensus *Consensus) IsLeader() bool {
consensus.mutex.RLock()
defer consensus.mutex.RUnlock()
// TODO: if remove locks blockchain stucks.
//consensus.mutex.RLock()
//defer consensus.mutex.RUnlock()
return consensus.isLeader()
}

Loading…
Cancel
Save