Add trustsystemclock
command line option to adjust whether peer input can affect the local perspective on time.
I know that there are multiple issues open dealing with local node time management (e.g.- #4521). I didn’t see a pull request though. So, here’s one.
This is the same patch set that gained acceptance as being useful for https://github.com/bitcoinxt/bitcoinxt/pull/35/files.
It’s a really simple change that gives the user the option of letting other nodes influence it’s perspective on time vs. not (a new default).
People have been using this for months without a problem that I’m aware of. At least it has actual usage behind it. If you think making the default “false”, to make the current functionality the default, is the way to go to get this included, then I could make that change to this PR.
At least this will give users an easy option to choose how they want to handle it.
On the command line, just use either -trustsystemclock=0
or -trustsystemclock=1
(the default in this initial proposed commit).