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

chaingen: Only revoke missed tickets once. #1484

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Oct 8, 2018

This modifies the test chain generator infrastructure that automatically tracks missed votes and generates revocations for them to only generate a single revocation and properly handle reorgs by removing revoked tickets from the pool of missed tickets when a block is connected and adding back any revoked tickets to the pool of missed tickets when a block that contains them is disconnected.

In addition, it modifies the handling of stake ticket purchases such that the associated ticket purchases are created after the munge functions run to ensure all changes are accurately account for. In particular, the indexes of the ticket purchase transactions within the block can change if the munger adds or removes transactions before them.

This allows the large reorg tests to work as intended again.

This modifies the test chain generator infrastructure that automatically
tracks missed votes and generates revocations for them to only generate
a single revocation and properly handle reorgs by removing revoked
tickets from the pool of missed tickets when a block is connected and
adding back any revoked tickets to the pool of missed tickets when a
block that contains them is disconnected.

In addition, it modifies the handling of stake ticket purchases such
that the associated ticket purchases are created after the munge
functions run to ensure all changes are accurately account for.  In
particular, the indexes of the ticket purchase transactions within the
block can change if the munger adds or removes transactions before them.

This allows the large reorg tests to work as intended again.
@davecgh davecgh added this to the 1.4.0 milestone Oct 8, 2018
@davecgh davecgh merged commit a24e640 into decred:master Oct 8, 2018
@davecgh davecgh deleted the chaingen_only_one_revocation branch October 8, 2018 15:38
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.

2 participants