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 how long AcceptBlock() takes to process. #1377

Closed
wants to merge 1 commit into from

Conversation

rebroad
Copy link
Contributor

@rebroad rebroad commented May 22, 2012

This change adds timing information for ProcessBlock and AcceptBlock, using the currently existing "ACCEPTED" line, but with timing infomation added.

Also, as a nicety, once the block chain has caught up, some an additional line is shown providing feedback on what bitcoind is doing (i.e. when validating a block).

@@ -1818,6 +1829,9 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
if (!pblock->AcceptBlock())
return error("ProcessBlock() : AcceptBlock FAILED");

printf("Block ACCEPTED %15"PRI64d"ms\n", GetTimeMillis() - nStart);
nStart = GetTimeMillis();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be inside the foreach loop...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luke-jr Ah, I had it inside on another branch, but it got missed in this one. Fixed. Thanks.

@gavinandresen
Copy link
Contributor

NACK. If you want to time stuff, then use -logtimestamps, lets not dirty up the code with lots of special-case timing logic.

@rebroad
Copy link
Contributor Author

rebroad commented May 29, 2012

@gavinandresen why do we time other things then, such as flushing, etc?

@gavinandresen
Copy link
Contributor

Either because those other things were implemented before -logtimestamps or because I didn't notice/ask that they get removed after whatever optimization they were a part of got pulled.

@jgarzik
Copy link
Contributor

jgarzik commented Aug 1, 2012

nak'd by gavin, closing

@jgarzik jgarzik closed this Aug 1, 2012
@rebroad rebroad deleted the AcceptBlockTiming branch March 8, 2016 08:41
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
Imports keys from an Electrum wallet export file (.csv or .json)
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Jan 22, 2019
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
a43aefd Update settingsbittoolwidget.cpp (RottenCoin)

Pull request description:

  correction

ACKs for top commit:
  random-zebra:
    utACK a43aefd
  furszy:
    utACK a43aefd and merging..

Tree-SHA512: 649cf44c136b6e750009f95157a557f06aff24022702b5702b68da4fa39550409a1b1ae9fc093d9e0b788a4dcd6b6ad53564a693a7e9044cf6b991dac23358fa
@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

4 participants