|
|
@ -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). |
|
|
|