Skip to content

Commit fa37e79

Browse files
author
MarcoFalke
committed
wallet: Replace confusing getAdjustedTime() with GetTime()
1 parent e7507f3 commit fa37e79

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

src/interfaces/chain.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ class Chain
217217
//! Check if shutdown requested.
218218
virtual bool shutdownRequested() = 0;
219219

220-
//! Get adjusted time.
221-
virtual int64_t getAdjustedTime() = 0;
222-
223220
//! Send init message.
224221
virtual void initMessage(const std::string& message) = 0;
225222

src/node/interfaces.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,6 @@ class ChainImpl : public Chain
656656
return chainman().ActiveChainstate().IsInitialBlockDownload();
657657
}
658658
bool shutdownRequested() override { return ShutdownRequested(); }
659-
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
660659
void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); }
661660
void initWarning(const bilingual_str& message) override { InitWarning(message); }
662661
void initError(const bilingual_str& message) override { InitError(message); }

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void WalletTxToJSON(const CWallet& wallet, const CWalletTx& wtx, UniValue
183183
conflicts.push_back(conflict.GetHex());
184184
entry.pushKV("walletconflicts", conflicts);
185185
entry.pushKV("time", wtx.GetTxTime());
186-
entry.pushKV("timereceived", (int64_t)wtx.nTimeReceived);
186+
entry.pushKV("timereceived", int64_t{wtx.nTimeReceived});
187187

188188
// Add opt-in RBF status
189189
std::string rbfStatus = "no";

src/wallet/wallet.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ CWalletTx* CWallet::AddToWallet(CTransactionRef tx, const TxState& state, const
915915
bool fInsertedNew = ret.second;
916916
bool fUpdated = update_wtx && update_wtx(wtx, fInsertedNew);
917917
if (fInsertedNew) {
918-
wtx.nTimeReceived = chain().getAdjustedTime();
918+
wtx.nTimeReceived = GetTime();
919919
wtx.nOrderPos = IncOrderPosNext(&batch);
920920
wtx.m_it_wtxOrdered = wtxOrdered.insert(std::make_pair(wtx.nOrderPos, &wtx));
921921
wtx.nTimeSmart = ComputeTimeSmart(wtx, rescanning_old_block);
@@ -1286,7 +1286,6 @@ void CWallet::updatedBlockTip()
12861286
m_best_block_time = GetTime();
12871287
}
12881288

1289-
12901289
void CWallet::BlockUntilSyncedToCurrentChain() const {
12911290
AssertLockNotHeld(cs_wallet);
12921291
// Skip the queue-draining stuff if we know we're caught up with

0 commit comments

Comments
 (0)