Locks for start.

pull/4377/head
frozen 2 years ago committed by Casey Gardiner
parent 8be3607bf0
commit 696f1a081c
  1. 4
      consensus/consensus_v2.go

@ -331,12 +331,16 @@ func (consensus *Consensus) Start(
}
func (consensus *Consensus) StartChannel() {
consensus.mutex.Lock()
consensus.isInitialLeader = consensus.IsLeader()
if consensus.isInitialLeader {
consensus.start = true
consensus.getLogger().Info().Time("time", time.Now()).Msg("[ConsensusMainLoop] Send ReadySignal")
consensus.mutex.Unlock()
consensus.ReadySignal <- SyncProposal
return
}
consensus.mutex.Unlock()
}
func (consensus *Consensus) syncReadyChan() {

Loading…
Cancel
Save