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 mining bug - lockup in CreateNewBlock loop #1184

Merged

Conversation

hans-schmidt
Copy link
Contributor

This bug was discovered in Dec-2021 on mainnet when two blocks were mined within one second. Pool operators locked up and required restarting.

It happened because when CheckTxInputs finds a double spend, ConnectBlock fails but does not mark the bad transaction to be flushed from the mempool.

It is described in detail in Issue #1183 which this PR fixes.

Thanks go to Jeremy for help with this bug.

This bug was discovered in Dec-2021 when two blocks were mined within one second.
Pool operators locked up and required restarting.

It happened because when CheckTxInputs finds a double spend, ConnectBlock fails but
didn't mark the bad txn to be flushed from the mempool.
Copy link
Contributor

@HyperPeek HyperPeek left a comment

Choose a reason for hiding this comment

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

Could not test, but explanation and fix looks good to me.
Approved.

@hans-schmidt hans-schmidt deleted the bug_fix_createnewblock_loop branch March 22, 2022 17:25
@hans-schmidt hans-schmidt restored the bug_fix_createnewblock_loop branch March 23, 2022 16:17
@hans-schmidt hans-schmidt reopened this Mar 23, 2022
@hans-schmidt
Copy link
Contributor Author

I re-opened this PR. It was closed unintentionally automatically by github as a side-effect of some cleanup I did on my local repo of the code fork in my personal github account..

@TronBlack TronBlack merged commit 0472cd6 into RavenProject:develop Apr 1, 2022
@hans-schmidt hans-schmidt deleted the bug_fix_createnewblock_loop branch April 27, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants