Remove uses of GetAdjustedTime in wallet code
This commit does not change behavior.
This commit is contained in:
parent
6d6bcc77c0
commit
c5e59a96a8
3 changed files with 6 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include <protocol.h>
|
#include <protocol.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <threadsafety.h>
|
#include <threadsafety.h>
|
||||||
|
#include <timedata.h>
|
||||||
#include <txmempool.h>
|
#include <txmempool.h>
|
||||||
#include <uint256.h>
|
#include <uint256.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
|
@ -237,6 +238,7 @@ public:
|
||||||
}
|
}
|
||||||
bool getPruneMode() override { return ::fPruneMode; }
|
bool getPruneMode() override { return ::fPruneMode; }
|
||||||
bool p2pEnabled() override { return g_connman != nullptr; }
|
bool p2pEnabled() override { return g_connman != nullptr; }
|
||||||
|
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -164,6 +164,9 @@ public:
|
||||||
|
|
||||||
//! Check if p2p enabled.
|
//! Check if p2p enabled.
|
||||||
virtual bool p2pEnabled() = 0;
|
virtual bool p2pEnabled() = 0;
|
||||||
|
|
||||||
|
//! Get adjusted time.
|
||||||
|
virtual int64_t getAdjustedTime() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Interface to let node manage chain clients (wallets, or maybe tools for
|
//! Interface to let node manage chain clients (wallets, or maybe tools for
|
||||||
|
|
|
@ -940,7 +940,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
|
||||||
wtx.BindWallet(this);
|
wtx.BindWallet(this);
|
||||||
bool fInsertedNew = ret.second;
|
bool fInsertedNew = ret.second;
|
||||||
if (fInsertedNew) {
|
if (fInsertedNew) {
|
||||||
wtx.nTimeReceived = GetAdjustedTime();
|
wtx.nTimeReceived = chain().getAdjustedTime();
|
||||||
wtx.nOrderPos = IncOrderPosNext(&batch);
|
wtx.nOrderPos = IncOrderPosNext(&batch);
|
||||||
wtx.m_it_wtxOrdered = wtxOrdered.insert(std::make_pair(wtx.nOrderPos, &wtx));
|
wtx.m_it_wtxOrdered = wtxOrdered.insert(std::make_pair(wtx.nOrderPos, &wtx));
|
||||||
wtx.nTimeSmart = ComputeTimeSmart(wtx);
|
wtx.nTimeSmart = ComputeTimeSmart(wtx);
|
||||||
|
|
Loading…
Reference in a new issue