exponential viewchange timeout

pull/2231/head
Ganesha Upadhyaya 5 years ago
parent 59859250f1
commit c8a4945e69
  1. 4
      consensus/view_change.go

@ -119,8 +119,8 @@ func (consensus *Consensus) startViewChange(viewID uint64) {
consensus.current.SetViewID(viewID) consensus.current.SetViewID(viewID)
consensus.LeaderPubKey = consensus.GetNextLeaderKey() consensus.LeaderPubKey = consensus.GetNextLeaderKey()
diff := viewID - consensus.viewID diff := int64(viewID - consensus.viewID)
duration := time.Duration(int64(diff) * int64(viewChangeDuration)) duration := time.Duration(diff * diff * int64(viewChangeDuration))
consensus.getLogger().Info(). consensus.getLogger().Info().
Uint64("ViewChangingID", viewID). Uint64("ViewChangingID", viewID).
Dur("timeoutDuration", duration). Dur("timeoutDuration", duration).

Loading…
Cancel
Save