Do not propose new block if I am not the leader

pull/1816/head
Rongjian Lan 5 years ago
parent 3047ca74dd
commit e86f25a5b9
  1. 2
      node/node_newblock.go

@ -42,7 +42,7 @@ func (node *Node) WaitForConsensusReadyV2(readySignal chan struct{}, stopChan ch
Msg("Consensus new block proposal: STOPPED!")
return
case <-readySignal:
for {
for node.Consensus != nil && node.Consensus.IsLeader() {
time.Sleep(PeriodicBlock)
if time.Now().Before(deadline) {
continue

Loading…
Cancel
Save