blockchain: Test auto revocation input index. - #3787
Open
matthawkins90 wants to merge 1 commit into
Open
Conversation
This adds a test case to TestAutoRevocations for the consensus rule that requires the first input of a revocation to reference the ticket submission output. The rule applies when automatic ticket revocations are active. The new case modifies the version 2 revocation for a missed ticket so that its ticket input references the ticket change output at index 2. It then ensures the block is rejected due to the invalid input. The case uses index 2 rather than index 1 since the commitment output at index 1 is an OP_RETURN output that is never part of the utxo set. A revocation that references it fails with a missing utxo error before the input index check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #3786 I added a test for this consensus rule for the pre-DCP0009 case. This PR covers the live consensus code, where automatic ticket revocations are active.
The new case extends
TestAutoRevocations, which already activates the agenda and creates version 2 revocations for missed tickets.Part of the test coverage work for #1182.