We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have some code that is supposed to handle clock skew.
static int64 nTimeOffset = 0; int64 GetAdjustedTime() { return GetTime() + nTimeOffset; } void AddTimeData(const CNetAddr& ip, int64 nTime) { // 50 lines of voodoo updating your clock from other nodes }
We can see this being adjusted in the debug.log file:
debug.log
Added time data, samples 2, offset -40 (+0 minutes) Added time data, samples 3, offset -17 (+0 minutes) dded time data, samples 4, offset -17 (+0 minutes) Added time data, samples 5, offset -53 (+0 minutes) nTimeOffset = -17 (+0 minutes)
However it goes wonky sometimes:
nTimeOffset = -51 (+0 minutes) Added time data, samples 64, offset -27 (+0 minutes) Added time data, samples 65, offset -14 (+0 minutes) nTimeOffset = -51 (+0 minutes) Added time data, samples 66, offset -1269 (-21 minutes)
This seems bad especially since on this computer the time was within 2 milliseconds of "true" time based on NTP.
One possibility is just to report clock skew if detected, but never to adjust.
In any case, research this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We have some code that is supposed to handle clock skew.
We can see this being adjusted in the
debug.log
file:However it goes wonky sometimes:
This seems bad especially since on this computer the time was within 2 milliseconds of "true" time based on NTP.
One possibility is just to report clock skew if detected, but never to adjust.
In any case, research this.
The text was updated successfully, but these errors were encountered: