File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
rust/rbac-registration/src/cardano/cip509 Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 44
55use std:: { borrow:: Cow , collections:: HashMap } ;
66
7- use anyhow:: anyhow;
7+ use anyhow:: { anyhow, Context } ;
88use cardano_blockchain_types:: { MultiEraBlock , TxnIndex } ;
99use catalyst_types:: {
1010 hashes:: { Blake2b256Hash , BLAKE_2B256_SIZE } ,
@@ -149,16 +149,8 @@ impl Cip509 {
149149 payment_history,
150150 report : & mut report,
151151 } ;
152- let cip509 = match Cip509 :: decode ( & mut decoder, & mut decode_context) {
153- Ok ( v) => v,
154- Err ( e) => {
155- // We should get here only if we were unable to decode even the first byte.
156- decode_context
157- . report
158- . other ( & format ! ( "{e:?}" ) , "Failed to decode Cip509" ) ;
159- return Ok ( Some ( Self :: with_decode_context ( & decode_context) ) ) ;
160- } ,
161- } ;
152+ let cip509 =
153+ Cip509 :: decode ( & mut decoder, & mut decode_context) . context ( "Failed to decode Cip509" ) ?;
162154
163155 // Perform the validation.
164156 if let Some ( txn_inputs_hash) = & cip509. txn_inputs_hash {
You can’t perform that action at this time.
0 commit comments