-
Notifications
You must be signed in to change notification settings - Fork 35.9k
New issue
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
Show block timestamp #1304
Show block timestamp #1304
Conversation
(Just for the benefit of people finding this pull request in google searches: Negative timestamps are not a sign of manipulation, nodes make no effort to avoid negative timestamps— they just use their accurate times. Ntimerolling by miners sometimes moves the time far ahead and then the next block gets the correct time at a time earlier than the prior one) |
@gmaxwell they aren't usually a sign of manipulation, but they could be a sign. This is correct, right? It's rare, admittedly, and might never have happened so far! |
@rebroad It's not an interesting form of manipulation (someone could lie to slightly increase the difficulty by a about half a percent), but I wasn't taking issue with your comment. There have been some people who saw the negative going timestamps and ran around claiming it was an attack, seems to be a common mistake people make in assuming that it won't happen absent an attack. Logging it sounds fine to me. |
wrap lines
ACK. I think it's still interesting to have these in debug.log, even if just as a way of keeping track of how far you are behind. |
If you indent, can you please "always" use 4 spaces (4 spaces == 1 tab kind of)? |
@Diapolo I thought 4 spaces was for inside functions/parenthesis, and 2 spaces is for lines that have been broken up over more than one line. |
I'm not sure abot that, it just looked weird to me. |
oooh.. it got merged. almost 3 months later. cool. thanks! |
Show block timestamp
Adds the block timestamp to the debug.log output. Can be useful when catching up and viewing the progress in debug.log to see how far behind on the blockchain the node is. Can also be interesting to see the duration between blocks, and sometimes even seeing the odd block that has timestamps earlier than previous blocks - which could indicate whether the network is attempting to be manipulated.
This pull is a subset of pull #1311