I set my computers date to 2012-07-13 and tried to start the client (current master) and during startup it simply crashes. This is from the debug.log:
07/13/12 13:56:32 ERROR: CheckBlock() : block timestamp too far in the future
07/13/12 13:56:32 LoadBlockIndex() : *** found bad block at 34105, hash=0000000037c57b5ff0ebedd38469b9797c89e8640cbcd52dc967d3805e487b51
07/13/12 13:56:32 ERROR: LoadBlockIndex(): chain database corrupted
There should be a check and warning like the one in util.cpp - AddTimeData(), but this needs to be done from some core dev.
Did any other dev try this? Or am I the only one that can re-create that crash situation?
@sipa Did you check this out? Does it happen also on Linux or with bitcoind?
Would it be possible to make an NTP request to a one of a list of well known time servers to check for this kind of problem?
This problem would be solved with a friendlier error message. Bailing out
as early as possible is all we can do when the user's clock is detected to
be wrong by this much.
(p2p nodes already send their time so ntp is not needed, and relying on
well known servers would be a big nono for a distributed protocol)
@laanwj I would prefer an error message before the client simply crashes, before we talk about how friedly that message should be :-D. Does a wrong time cause a crash on Linux, too with current master?
I would suggest it as a client feature, not a part of the protocol.
But you are right, the protocol does seem to provide for time services already. I apologize for the superfluous suggestion.
@sipa Any comment for this one?