[viewchange] init bitmap before init payload

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3379/head
Leo Chen 4 years ago
parent 75fb354ee7
commit 1c0e872b6e
  1. 3
      consensus/view_change.go

@ -138,6 +138,9 @@ func (consensus *Consensus) startViewChange(viewID uint64) {
consensus.consensusTimeout[timeoutViewChange].SetDuration(duration) consensus.consensusTimeout[timeoutViewChange].SetDuration(duration)
defer consensus.consensusTimeout[timeoutViewChange].Start() defer consensus.consensusTimeout[timeoutViewChange].Start()
// update the dictionary key if the viewID is first time received
consensus.vc.AddViewIDKeyIfNotExist(viewID, consensus.Decider.Participants())
// init my own payload // init my own payload
if err := consensus.vc.InitPayload( if err := consensus.vc.InitPayload(
consensus.FBFTLog, consensus.FBFTLog,

Loading…
Cancel
Save