Merge pull request #1816 from rlan35/epoch_change

Do not propose new block if I am not the leader
pull/1817/head
Rongjian Lan 5 years ago committed by GitHub
commit be02ac4c66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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