Zebra/zebra-consensus/src
Janito Vaqueiro Ferreira Filho db0cdb74ff
Update `has_inputs_and_outputs` to check V5 transactions (#2229)
* Fix documentation comment

Was missing a slash to become documentation.

* Add documentation link to type reference

Just to help navigation a bit.

* Implement `Transaction::orchard_actions()` getter

Returns an iterator to iterator over the actions in the Orchard shielded
data (if there is one, otherwise it returns an empty iterator).

* Add V5 support for `has_inputs_and_outputs`

Checks if the transaction has Orchard actions. If it does, it is
considered to have inputs and outputs.

* Refactor transaction test vectors

Make it easier to reuse the fake V5 transaction converter in other test
vectors.

* Move helper function to `zebra-chain` crate

Place it together with some other helper functions, including the one
that actually creates the fake V5 transaction.

* Test transaction with no inputs

`check::has_inputs_and_outputs` should return an error indicating that
the transaction has no inputs.

* Test transaction with no outputs

`check::has_inputs_and_outputs` should return an error indicating that
the transaction has no outputs.

* Note that transaction is fake in `expect` message

Should make the message easier to find, and also gives emphasis to the
fact that the transaction is a fake conversion to V5.

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2021-06-02 11:32:52 +10:00
..
block Validate nConsensusBranchId (#2100) 2021-05-10 01:31:45 +00:00
chain Delete duplicate test code for chain verifier 2021-03-04 08:06:31 +10:00
checkpoint Fix some missed Sapling to Canopy checkpoint code changes 2021-03-18 10:13:47 +10:00
parameters Replace smart quotes with ascii quotes 2021-03-15 03:18:10 -04:00
primitives Rename shielded_data to sapling_shielded_data as needed (#2072) 2021-04-27 10:37:53 -03:00
transaction Update `has_inputs_and_outputs` to check V5 transactions (#2229) 2021-06-02 11:32:52 +10:00
block.rs Validate nConsensusBranchId (#2100) 2021-05-10 01:31:45 +00:00
chain.rs Document the correctness of Poll::Pending wakeups 2021-03-27 08:55:49 -04:00
checkpoint.rs Validate nConsensusBranchId (#2100) 2021-05-10 01:31:45 +00:00
config.rs Document that the mandatory checkpoint can change 2021-03-22 22:17:44 -04:00
error.rs Validate nConsensusBranchId (#2100) 2021-05-10 01:31:45 +00:00
lib.rs Merge pull request #1713 from ZcashFoundation/use-groth16-batch-math 2021-03-24 12:28:25 -04:00
parameters.rs move genesis parameters to zebra-chain (#1151) 2020-10-12 14:08:23 -07:00
primitives.rs Ed25519 async batch verification for JoinSplit signatures (#1952) 2021-03-31 09:08:19 +10:00
script.rs Make the state usage clearer in script::Verifier (#1733) 2021-02-16 05:53:12 +10:00
transaction.rs Add V5 transparent and sapling to transaction::check, add missing coinbase PrevOut check (#2070) 2021-04-28 10:43:00 +10:00