-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Sprout Join Split validation by transaction verifier (#2371)
* Refactor to create `verify_sprout_shielded_data` Move the join split verification code into a new `verify_sprout_shielded_data` helper method that returns an `AsyncChecks` set. * Test if signed V4 tx. join splits are accepted Create a fake V4 transaction with a dummy join split, and sign it appropriately. Check if the transaction verifier accepts the transaction. * Test if unsigned V4 tx. joinsplit data is rejected Create a fake V4 transaction with a dummy join split. Do NOT sign this transaction's join split data, and check that the verifier rejects the transaction. * Join tests to share Tokio runtime Otherwise one of the tests might fail incorrectly because of a limitation in the test environment. `Batch` services spawn a task in the Tokio runtime, but separate tests can have separate runtimes, so sharing a `Batch` service can lead to the worker task only being available for one of the tests.
- Loading branch information
Showing
4 changed files
with
180 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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