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 (#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