MarcoFalke 42b25025fa
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
2021-12-07 09:02:06 +01:00
..
2021-09-10 11:18:58 +08:00
2021-09-29 14:10:29 +02:00
2021-11-29 17:59:44 -05:00
2021-11-12 11:46:34 +01:00
2021-11-09 17:09:50 +00:00
2021-07-30 11:21:51 +02:00
2021-11-26 11:17:43 +01:00
2021-11-15 12:08:49 -05:00
2021-11-16 09:56:45 +01:00
2021-11-30 17:19:49 +01:00
2021-10-12 12:03:14 +13:00
2021-10-11 21:45:49 +10:00
2021-10-05 11:11:18 +02:00
2021-11-29 17:59:44 -05:00
2021-04-06 14:50:17 +08:00
2021-11-29 17:59:44 -05:00
2021-11-29 17:59:44 -05:00
2021-09-29 18:46:30 +02:00
2021-11-18 18:13:21 +01:00
2021-08-20 16:59:41 +02:00
2021-12-02 14:49:19 +00:00
2021-12-02 14:49:19 +00:00