diff options
author | Matt Corallo <git@bluematt.me> | 2016-10-06 14:11:45 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2016-10-31 10:08:11 -0400 |
commit | f5b960be4e9a9ab669e1436194fa904ccba58900 (patch) | |
tree | e5e1a7a0a87f56ec26ed8c24a3f325efce259a42 /src/main.cpp | |
parent | d8670fb103f95e6dc6f469d71c9ee4f6ff2407e0 (diff) |
Move nTimeBestReceived updating into net processing code
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index b99515a656..8232b0f74b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -63,7 +63,7 @@ CCriticalSection cs_main; BlockMap mapBlockIndex; CChain chainActive; CBlockIndex *pindexBestHeader = NULL; -int64_t nTimeBestReceived = 0; +int64_t nTimeBestReceived = 0; // Used only to inform the wallet of when we last received a block CWaitableCriticalSection csBestBlock; CConditionVariable cvBlockChange; int nScriptCheckThreads = 0; @@ -2690,7 +2690,6 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) { chainActive.SetTip(pindexNew); // New best block - nTimeBestReceived = GetTime(); mempool.AddTransactionsUpdated(1); cvBlockChange.notify_all(); @@ -4736,6 +4735,8 @@ void PeerLogicValidation::UpdatedBlockTip(const CBlockIndex *pindexNew, const CB } }); } + + nTimeBestReceived = GetTime(); } void PeerLogicValidation::BlockChecked(const CBlock& block, const CValidationState& state) { |