forked from vinteumorg/Floresta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chain: Test oversized scripts (vinteumorg#387)
* consensus: refactor verify_block_transactions This commit moves transaction-specific validation to a dedicated function. This will be used to test our transaction validation logic, and to verify mempool transactions in the future. A new function, `verify_transaction` was created. It takes the UTXOs map, a transaction, some flags and returns the input/output amounts or an error, if any. It'll check the following: - The transaction doesn't spend more coins than it claims in the inputs - The transaction doesn't create more coins than allowed - The transaction has valid scripts - The transaction doesn't have duplicate inputs * consensus: test over sized scripts This commit adds some tests with huge scripts to see our validation is working as expected. Those test cases were tested against core and we check if floresta outputs the same thing as the former.
- Loading branch information
1 parent
005189e
commit 4286473
Showing
12 changed files
with
627 additions
and
61 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
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
Oops, something went wrong.