aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-07 09:01:59 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-07 09:02:06 +0100
commit42b25025fa741a225bd0431bcec3144dbc7623b3 (patch)
treea5c916ca25102f71f848aae191a26883a805ddd7 /src/node
parent08dcc5912d86bd7b9760404f9bbaaa741f18aca6 (diff)
parentfa37e798b2660d8e44e31c944a257b55aeef5de2 (diff)
downloadbitcoin-42b25025fa741a225bd0431bcec3144dbc7623b3.tar.xz
Merge bitcoin/bitcoin#23644: wallet: Replace confusing getAdjustedTime() with GetTime()
fa37e798b2660d8e44e31c944a257b55aeef5de2 wallet: Replace confusing getAdjustedTime() with GetTime() (MarcoFalke) Pull request description: Setting `nTimeReceived` to the adjusted time has several issues: * `m_best_block_time` is set to the "unadjusted" time, thus a comparison of the two times is like comparing apples to oranges. In the worst case this opens up an attack vector where remote peers can force a premature re-broadcast of wallet txs. * The RPC documentation for `"timereceived"` doesn't mention that the network adjusted time is used, possibly confusing users when the time reported by RPC is off by a few seconds compared to their local timestamp. Fix all issues by replacing the call with `GetTime()`. Also a style fix: Use non-narrowing integer conversion in the RPC method. ACKs for top commit: theStack: Code-review ACK fa37e798b2660d8e44e31c944a257b55aeef5de2 shaavan: crACK fa37e798b2660d8e44e31c944a257b55aeef5de2 Tree-SHA512: 8d020ba400521246b7aed4b6c41319fc70552e8c69e929a5994500375466a9edac02a0ae64b803dbc6695df22276489561a23bd6e030c44c97d288f7b9b2b3fa
Diffstat (limited to 'src/node')
-rw-r--r--src/node/interfaces.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp
index e5f2753123..075842ef73 100644
--- a/src/node/interfaces.cpp
+++ b/src/node/interfaces.cpp
@@ -656,7 +656,6 @@ public:
return chainman().ActiveChainstate().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); }