Skip to content

Commit b0b68f9

Browse files
committed
fix(cardano-chain-follower): update cip509
Signed-off-by: bkioshn <[email protected]>
1 parent 9f48bd0 commit b0b68f9

File tree

1 file changed

+5
-4
lines changed
  • rust/cardano-chain-follower/src/metadata

1 file changed

+5
-4
lines changed

rust/cardano-chain-follower/src/metadata/cip509.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
55
use std::sync::Arc;
66

7+
use cardano_blockchain_types::{MetadatumLabel, TransactionAuxData};
78
use minicbor::{Decode, Decoder};
89
use pallas::ledger::traverse::MultiEraTx;
910
use rbac_registration::cardano::cip509::{Cip509 as RbacRegCip509, Cip509Validation, LABEL};
1011

1112
use super::{
12-
DecodedMetadata, DecodedMetadataItem, DecodedMetadataValues, RawAuxData, ValidationReport,
13+
DecodedMetadata, DecodedMetadataItem, DecodedMetadataValues, ValidationReport,
1314
};
1415

1516
/// CIP509 metadatum.
@@ -28,15 +29,15 @@ impl Cip509 {
2829
///
2930
/// Nothing. IF CIP509 Metadata is found it will be updated in `decoded_metadata`.
3031
pub(crate) fn decode_and_validate(
31-
decoded_metadata: &DecodedMetadata, txn: &MultiEraTx, raw_aux_data: &RawAuxData,
32+
decoded_metadata: &DecodedMetadata, txn: &MultiEraTx, raw_aux_data: &TransactionAuxData,
3233
) {
3334
// Get the CIP509 metadata if possible
34-
let Some(k509) = raw_aux_data.get_metadata(LABEL) else {
35+
let Some(k509) = raw_aux_data.metadata(MetadatumLabel::CIP509_RBAC) else {
3536
return;
3637
};
3738

3839
let mut validation_report = ValidationReport::new();
39-
let mut decoder = Decoder::new(k509.as_slice());
40+
let mut decoder = Decoder::new(k509.as_ref());
4041

4142
let cip509 = match RbacRegCip509::decode(&mut decoder, &mut ()) {
4243
Ok(metadata) => metadata,

0 commit comments

Comments
 (0)