Skip to content

Commit

Permalink
cast M to double (neo-project#1465)
Browse files Browse the repository at this point in the history
  • Loading branch information
belane authored and Tommo-L committed Jun 22, 2020
1 parent a2594db commit d442b94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/neo/Consensus/ConsensusService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private void OnCommitReceived(ConsensusPayload payload, Commit commit)
// this function increases existing timer (never decreases) with a value proportional to `maxDelayInBlockTimes`*`Blockchain.MillisecondsPerBlock`
private void ExtendTimerByFactor(int maxDelayInBlockTimes)
{
TimeSpan nextDelay = expected_delay - (TimeProvider.Current.UtcNow - clock_started) + TimeSpan.FromMilliseconds(maxDelayInBlockTimes * Blockchain.MillisecondsPerBlock / context.M);
TimeSpan nextDelay = expected_delay - (TimeProvider.Current.UtcNow - clock_started) + TimeSpan.FromMilliseconds(maxDelayInBlockTimes * Blockchain.MillisecondsPerBlock / (double)context.M);
if (!context.WatchOnly && !context.ViewChanging && !context.CommitSent && (nextDelay > TimeSpan.Zero))
ChangeTimer(nextDelay);
}
Expand Down

0 comments on commit d442b94

Please sign in to comment.