Because we represent each transaction version as a different variant of the Transaction enum, we end up in a situation where fields that are common to different transaction versions are awkward to access, requiring a match statement with identical match arms. To fix this, this commit adds the following convenience methods: * `Transaction::inputs() -> impl Iterator<Item=&TransparentInput>`; * `Transaction::outputs() -> impl Iterator<Item=&TransparentOutput>`; * `Transaction::lock_time() -> LockTime`; * `Transaction::expiry_height() -> Option<ExpiryHeight>`; The last returns an `Option` because the field is only present in V3 and V4 transactions. There are some remaining fields that do not get common accessors, because it probably doesn't make sense to access independently of knowing the transaction version: `joinsplit_data`, `shielded_data`, `value_balance`. |
||
|---|---|---|
| .. | ||
| proptest-regressions | ||
| src | ||
| Cargo.toml | ||