-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return tx validation errors, fix max script size (#311)
- Added a few `?` when needed. - Corrected the non-taproot max script size to 10,000 bytes. Then also fix some error return cases: - Check if the first tx is coinbase and return `FirstTxIsNotCoinbase` if it is not. `verify_coinbase` was previously only called if `transaction.is_coinbase() && n == 0` and the not coinbase case was not handled. - Previous `get_out_value` returned error when output had 0 sats value, but this is valid under the consensus rules. Removed it. - `consume_utxos` changed to `get_utxo`: the utxos are already consumed by the `verify_with_flags` method, since it takes a `utxos.remove(outpoint)` closure. - `UtxoAlreadySpent` error renamed to `UtxoNotFound`
- Loading branch information
Showing
4 changed files
with
115 additions
and
138 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
Oops, something went wrong.