mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02: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:
parent
f3ecf3025f
commit
f463cd1073
7 changed files with 26 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue