Skip to content
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

Merged
merged 1 commit into from
Jul 5, 2012
Merged

Show block timestamp #1304

merged 1 commit into from
Jul 5, 2012

Conversation

rebroad
Copy link
Contributor

@rebroad rebroad commented May 14, 2012

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

@gmaxwell
Copy link
Contributor

(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)

@rebroad
Copy link
Contributor Author

rebroad commented May 14, 2012

@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!

@gmaxwell
Copy link
Contributor

@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.

@sipa
Copy link
Member

sipa commented Jun 12, 2012

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.

@Diapolo
Copy link

Diapolo commented Jun 12, 2012

If you indent, can you please "always" use 4 spaces (4 spaces == 1 tab kind of)?

@rebroad
Copy link
Contributor Author

rebroad commented Jun 14, 2012

@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.

@Diapolo
Copy link

Diapolo commented Jun 14, 2012

I'm not sure abot that, it just looked weird to me.

jgarzik pushed a commit that referenced this pull request Jul 5, 2012
@jgarzik jgarzik merged commit 6e3a1a3 into bitcoin:master Jul 5, 2012
@rebroad
Copy link
Contributor Author

rebroad commented Sep 1, 2012

oooh.. it got merged. almost 3 months later. cool. thanks!

nifgraup pushed a commit to nifgraup/auroracoin-project that referenced this pull request Mar 30, 2014
@rebroad rebroad deleted the ShowBlockTimestamp branch December 4, 2016 16:04
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Jan 22, 2019
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants