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 for assert during certain cases of invalidateblock #866

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

psolstice
Copy link
Contributor

PR intention

Sigma code bug might cause assert on block disconnect. This PR prevents this

Code changes brief

sigmaMintedPubCoins field of CBlockIndex is accessed for read through operator [] without checking if the specific entry being queried already exists. It is possible to code in CSigmaState::RemoveBlock() to incorrectly process this empty entry and fail with assert.

This PR ensures that zero sized entry of sigmaMintedPubCoins is handled correctly and prevents unnecessary creation of new entities of this type

@a-bezrukov a-bezrukov merged commit f848d25 into master Jul 1, 2020
@a-bezrukov a-bezrukov deleted the sigma-empty-mintset-fix branch July 1, 2020 11:41
riordant pushed a commit that referenced this pull request Jul 13, 2020
* Fix for assert during certain cases of invalidateblock
* A race condition in block download is fixed
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.

3 participants