fix finality count for leader

pull/3441/head
Rongjian Lan 4 years ago
parent 600971337a
commit 2aed5e16df
  1. 2
      consensus/consensus_v2.go
  2. 1
      node/node_newblock.go

@ -343,6 +343,8 @@ func (consensus *Consensus) Start(
// Sleep to wait for the full block time // Sleep to wait for the full block time
consensus.getLogger().Info().Msg("[ConsensusMainLoop] Waiting for Block Time") consensus.getLogger().Info().Msg("[ConsensusMainLoop] Waiting for Block Time")
<-time.After(time.Until(consensus.NextBlockDue)) <-time.After(time.Until(consensus.NextBlockDue))
consensus.StartFinalityCount()
// Update time due for next block // Update time due for next block
consensus.NextBlockDue = time.Now().Add(consensus.BlockPeriod) consensus.NextBlockDue = time.Now().Add(consensus.BlockPeriod)

@ -80,7 +80,6 @@ func (node *Node) WaitForConsensusReadyV2(readySignal chan consensus.ProposalTyp
} }
} }
}() }()
node.Consensus.StartFinalityCount()
newBlock, err := node.ProposeNewBlock(newCommitSigsChan) newBlock, err := node.ProposeNewBlock(newCommitSigsChan)
if err == nil { if err == nil {

Loading…
Cancel
Save