From e92073298a90f741faf8ba46923842c4b8be6bd4 Mon Sep 17 00:00:00 2001 From: Shargon Date: Wed, 13 May 2020 17:57:06 +0200 Subject: [PATCH] Revert "Improve gap calculation" This reverts commit 9fa04a45b930dd60f655e98fd77ea124eec18741. --- src/neo/Consensus/ConsensusService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/neo/Consensus/ConsensusService.cs b/src/neo/Consensus/ConsensusService.cs index 788719ae14..b51d9acf7d 100644 --- a/src/neo/Consensus/ConsensusService.cs +++ b/src/neo/Consensus/ConsensusService.cs @@ -307,7 +307,9 @@ private void OnConsensusPayload(ConsensusPayload payload) private void OnPersistCompleted(Block block) { Log($"persist block: height={block.Index} hash={block.Hash} tx={block.Transactions.Length}"); - block_received_time = TimeProvider.Current.UtcNow; + DateTime now = TimeProvider.Current.UtcNow; + block_received_gap = now - block_received_time; + block_received_time = now; knownHashes.Clear(); InitializeConsensus(0); }