From f463cd107361a172a17e4c5510b06eb8a67aade0 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Thu, 28 Mar 2019 13:15:47 -0400 Subject: [wallet] Keep track of the best block time in the wallet Move nTimeBestReceived (which is only used for wallet rebroadcasts) into the wallet. --- src/net_processing.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/net_processing.cpp') diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 0f13d6e26..3fd3068fb 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -175,8 +175,6 @@ namespace { /** Expiration-time ordered list of (expire time, relay map entry) pairs. */ std::deque> vRelayExpiration GUARDED_BY(cs_main); - std::atomic nTimeBestReceived(0); // Used only to inform the wallet of when we last received a block - struct IteratorComparator { template @@ -1121,8 +1119,6 @@ void PeerLogicValidation::UpdatedBlockTip(const CBlockIndex *pindexNew, const CB }); connman->WakeMessageHandler(); } - - nTimeBestReceived = GetTime(); } /** @@ -3555,7 +3551,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto) // transactions become unconfirmed and spams other nodes. if (!fReindex && !fImporting && !IsInitialBlockDownload()) { - GetMainSignals().Broadcast(nTimeBestReceived, connman); + GetMainSignals().Broadcast(connman); } // -- cgit v1.2.3