diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 98471db956..85b6c9daee 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -226,9 +226,6 @@ public: //! Check if shutdown requested. virtual bool shutdownRequested() = 0; - //! Get adjusted time. - virtual int64_t getAdjustedTime() = 0; - //! Send init message. virtual void initMessage(const std::string& message) = 0; diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 34ed833f25..e821709e7f 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -785,7 +785,6 @@ public: bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !::ChainstateActive().IsInitialBlockDownload(); } bool isInitialBlockDownload() override { return ::ChainstateActive().IsInitialBlockDownload(); } bool shutdownRequested() override { return ShutdownRequested(); } - int64_t getAdjustedTime() override { return GetAdjustedTime(); } void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); } void initWarning(const bilingual_str& message) override { InitWarning(message); } void initError(const bilingual_str& message) override { InitError(message); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 1d85741912..b8b4006cdd 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -183,7 +183,7 @@ static void WalletTxToJSON(interfaces::Chain& chain, const CWalletTx& wtx, UniVa conflicts.push_back(conflict.GetHex()); entry.pushKV("walletconflicts", conflicts); entry.pushKV("time", wtx.GetTxTime()); - entry.pushKV("timereceived", (int64_t)wtx.nTimeReceived); + entry.pushKV("timereceived", int64_t{wtx.nTimeReceived}); for (const std::pair& item : wtx.mapValue) entry.pushKV(item.first, item.second); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 72f478575d..c87c50e8a2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -864,7 +864,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose) wtx.BindWallet(this); bool fInsertedNew = ret.second; if (fInsertedNew) { - wtx.nTimeReceived = chain().getAdjustedTime(); + wtx.nTimeReceived = GetTime(); wtx.nOrderPos = IncOrderPosNext(&batch); wtx.m_it_wtxOrdered = wtxOrdered.insert(std::make_pair(wtx.nOrderPos, &wtx)); wtx.nTimeSmart = ComputeTimeSmart(wtx); @@ -1277,7 +1277,6 @@ void CWallet::UpdatedBlockTip() m_best_block_time = GetTime(); } - void CWallet::BlockUntilSyncedToCurrentChain() const { AssertLockNotHeld(cs_wallet); // Skip the queue-draining stuff if we know we're caught up with