mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
[wallet] Keep track of the best block time in the wallet
Move nTimeBestReceived (which is only used for wallet rebroadcasts) into the wallet.
This commit is contained in:
@@ -175,8 +175,6 @@ namespace {
|
||||
/** Expiration-time ordered list of (expire time, relay map entry) pairs. */
|
||||
std::deque<std::pair<int64_t, MapRelay::iterator>> vRelayExpiration GUARDED_BY(cs_main);
|
||||
|
||||
std::atomic<int64_t> nTimeBestReceived(0); // Used only to inform the wallet of when we last received a block
|
||||
|
||||
struct IteratorComparator
|
||||
{
|
||||
template<typename I>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user