Skip to content

Fix stopatheight#10569

Merged
laanwj merged 1 commit intobitcoin:masterfrom
achow101:fix-stopatheight
Jun 11, 2017
Merged

Fix stopatheight#10569
laanwj merged 1 commit intobitcoin:masterfrom
achow101:fix-stopatheight

Conversation

@achow101
Copy link
Member

@achow101 achow101 commented Jun 9, 2017

Moves stopatheight check into the ActivateBestChain loop so that the block height is actually checked and stopped at the appropriate time.

Noticed and reported here: #10339 (comment)

Copy link
Member

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Member

Choose a reason for hiding this comment

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

Can you move this line out of the loop? No need to parse the command line argument for every block.

@luke-jr
Copy link
Member

luke-jr commented Jun 9, 2017

What's up with the random optimisation?

@achow101 achow101 force-pushed the fix-stopatheight branch from 74eed46 to 8f57411 Compare June 9, 2017 20:40
Moves stopatheight check into the ActivateBestChain loop so that the block height is actually checked and stopped at the appropriate time.
@achow101 achow101 force-pushed the fix-stopatheight branch from 8f57411 to c45cbaf Compare June 9, 2017 20:40
@achow101
Copy link
Member Author

achow101 commented Jun 9, 2017

sorry, checked out from the wrong worktree

@sipa
Copy link
Member

sipa commented Jun 9, 2017

utACK c45cbaf

@paveljanik
Copy link
Contributor

utACK c45cbaf

@laanwj
Copy link
Member

laanwj commented Jun 11, 2017

I thought I was doing something wrong :$
Thanks for fixing this.
Tested ACK c45cbaf

$ src/bitcoind -datadir=/store/tmp/testbtc -reindex-chainstate -stopatheight=200000 -printtoconsole
2017-06-11 12:00:02 UpdateTip: new best=000000000000034a7dedef4a161fa058a2d67a173a90155f3a2fe6fc132e0ebf height=200000 version=0x00000002 log2_work=68.741562 tx=7316696 date='2012-09-22 10:45:59' progress=0.032039 cache=359.0MiB(2636343txo)
...
2017-06-11 12:00:18 Shutdown: done

As stopatheight is not in any releases this doesn't need backport.

@laanwj laanwj merged commit c45cbaf into bitcoin:master Jun 11, 2017
laanwj added a commit that referenced this pull request Jun 11, 2017
c45cbaf Fix stopatheight (Andrew Chow)

Tree-SHA512: 7df07ca1d40a5a3a8d93ad8943cd04954d587e19bbb63ed084b7aff9503788ec73a1045fbfc4a36d9775975032c2ee0bcc76eb4da10e879f483eaa6f351c19b2
@achow101 achow101 deleted the fix-stopatheight branch June 12, 2017 17:39
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Jun 15, 2017
Moves stopatheight check into the ActivateBestChain loop so that the block height is actually checked and stopped at the appropriate time.

Github-Pull: bitcoin#10569
Rebased-From: c45cbaf
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 8, 2019
c45cbaf Fix stopatheight (Andrew Chow)

Tree-SHA512: 7df07ca1d40a5a3a8d93ad8943cd04954d587e19bbb63ed084b7aff9503788ec73a1045fbfc4a36d9775975032c2ee0bcc76eb4da10e879f483eaa6f351c19b2
@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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants