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

Fix reorganization crash #2876

Merged
merged 2 commits into from
Aug 16, 2013
Merged

Fix reorganization crash #2876

merged 2 commits into from
Aug 16, 2013

Conversation

sipa
Copy link
Member

@sipa sipa commented Aug 3, 2013

This is a potential fix for the bug that causes several miner nodes to crash a few days ago.

The problem: when a block is disconnected, the transactions in it are attempted to be moved to the mempool; if some of these are non-standard, this will fail. If there were transactions in the mempool already that depended one or more of those, they become orphan transactions - which breaks the mempool's consistency assumption.

In addition, this pull request adds a CTxMempool::check() method which runs an extensive consistency check on the mempool, and is called from several places when -checkmempool is passed (a non-documented flag).

@sipa
Copy link
Member Author

sipa commented Aug 3, 2013

Small update: made -checkmempool default in regtest mode.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/97bf6a7aef976cee0200c11f3915b4d7c0f33c10 for binaries and test log.
This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
Contact BlueMatt on freenode if something looks broken.

@gavinandresen
Copy link
Contributor

ACK; logic looks good, compiles and runs on OSX.

@sipa
Copy link
Member Author

sipa commented Aug 15, 2013

Rebased.

@gmaxwell
Copy link
Contributor

ACK. I think we should pull this, but I also think pulltester should gain a reproduction of it. @bluematt where are we keeping issues for the pulltester?

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2461aba1ac4e0673ed0568713b48e4bb37c8b041 for binaries and test log.
This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
Contact BlueMatt on freenode if something looks broken.

gavinandresen added a commit that referenced this pull request Aug 16, 2013
@gavinandresen gavinandresen merged commit 9be4cff into bitcoin:master Aug 16, 2013
@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.

4 participants