-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multi: No stake height checks in check tx inputs.
This removes a redundant check for validating that votes and revocations are not in a block before they are allowed from CheckTransactionInputs since it has nothing to do with validation of transaction inputs and it's an impossible condition to hit in the block validation path because the same check is done much earlier in the validation process. It should also be noted that the checks this removes are also more permissive than they need to be because the first vote is not allowed until stake validation height, which is after stake enabled height. There is no effect on consensus because, as previously mentioned, the more restrictive checks earlier in the process prevent these checks from ever being exercised. However, the mempool previously relied on this duplicate check to reject early votes and revocations, so this adds the checks, with the corrected heights, directly to the mempool early in the process where they more naturally belong. It is more efficient to reject the transactions in that scenario earlier before doing more work as well.
- Loading branch information
Showing
3 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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