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

blockchain: Fix ticket db disconnect revocations. #2768

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

rstaudt2
Copy link
Member

This addresses an issue in the ticket database when disconnecting a block that contains an automatic revocation.

When the automatic ticket revocations agenda is enabled, a ticket can become missed and revoked in the same block. When connecting that block to the ticket database, this is recorded as two separate entries in the undo data (the first moving it to missed, and the second moving it to revoked). Therefore, when disconnecting the block, the undo data needs to be applied in reverse order.

This addresses an issue in the ticket database when disconnecting a
block that contains an automatic revocation.

When the automatic ticket revocations agenda is enabled, a ticket can
become missed and revoked in the same block.  When connecting that block
to the ticket database, this is recorded as two separate entries in the
undo data (the first moving it to missed, and the second moving it to
revoked).  Therefore, when disconnecting the block, the undo data needs
to be applied in reverse order.
@davecgh davecgh merged commit 8fd2406 into decred:master Oct 28, 2021
@rstaudt2 rstaudt2 deleted the ticketdb-disconnect-fix branch October 28, 2021 21:58
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.

4 participants