Skip to content

Commit

Permalink
Improve gap calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon authored May 13, 2020
1 parent 5413b7b commit 9fa04a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/neo/Consensus/ConsensusService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ private void OnConsensusPayload(ConsensusPayload payload)
private void OnPersistCompleted(Block block)
{
Log($"persist block: height={block.Index} hash={block.Hash} tx={block.Transactions.Length}");
knownHashes.Clear();
InitializeConsensus(0);
DateTime now = TimeProvider.Current.UtcNow;
block_received_gap = now - block_received_time;
block_received_time = now;
knownHashes.Clear();
InitializeConsensus(0);
}

private void OnRecoveryMessageReceived(ConsensusPayload payload, RecoveryMessage message)
Expand Down

0 comments on commit 9fa04a4

Please sign in to comment.