https://github.com/bitcoin/bitcoin/pull/29623

Motivation

This PR builds on top of PR #28956 to cleanup the network-adjusted time leftovers.

The main achievements of this PR are:

Thoughts/Questions

The PR has already gone through a few rounds of review, so most of the design decisions have already been discussed and reshaped when needed.

I think the PR makes sense, some of the commits are cherry-picked from #28956, before it was reshaped to exclude the warning part, so I already reviewed them there.

The main differences now are, as stated by the PR description, how times are sampled and when the warning is displayed:

Furthermore, the way the warning is shown has also been improved. Before this PR, the warning would have been shown only once, but now it would be shown in the logs every time we go offsync or create a new outbound connection while offsync, plus in the GUI (at most once every 60 min), so the user is well aware of the issue.

Review

Simplify network-adjusted time warning logic by stickies-v · Pull Request #29623 · bitcoin/bitcoin