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.LeaderPubKey = consensus.GetNextLeaderKey()
diff := viewID - consensus.viewID
duration := time.Duration(int64(diff) * int64(viewChangeDuration))
diff := int64(viewID - consensus.viewID)
duration := time.Duration(diff * diff * int64(viewChangeDuration))
consensus.getLogger().Info().
Uint64("ViewChangingID", viewID).
Dur("timeoutDuration", duration).

Loading…
Cancel
Save