File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
zebra-consensus/src/transaction Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -44,21 +44,15 @@ fn v5_fake_transactions() -> Result<(), Report> {
44
44
check:: coinbase_tx_no_prevout_joinsplit_spend ( & transaction) ?;
45
45
46
46
// validate the sapling shielded data
47
- match transaction {
48
- Transaction :: V5 {
49
- sapling_shielded_data,
50
- ..
51
- } => {
52
- if let Some ( s) = sapling_shielded_data {
53
- for spend in s. spends_per_anchor ( ) {
54
- check:: spend_cv_rk_not_small_order ( & spend) ?
55
- }
56
- for output in s. outputs ( ) {
57
- check:: output_cv_epk_not_small_order ( output) ?;
58
- }
59
- }
47
+ if transaction. version ( ) == 5 {
48
+ for spend in transaction. sapling_spends_per_anchor ( ) {
49
+ check:: spend_cv_rk_not_small_order ( & spend) ?;
60
50
}
61
- _ => panic ! ( "we should have no tx other than 5" ) ,
51
+ for output in transaction. sapling_outputs ( ) {
52
+ check:: output_cv_epk_not_small_order ( output) ?;
53
+ }
54
+ } else {
55
+ panic ! ( "we should have no tx other than 5" ) ;
62
56
}
63
57
}
64
58
}
You can’t perform that action at this time.
0 commit comments