Skip to content

Commit c181ca9

Browse files
committed
chore(cardano-chain-follower): add cip509 to example
Signed-off-by: bkioshn <[email protected]>
1 parent c441fb6 commit c181ca9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

rust/cardano-chain-follower/examples/follow_chains.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use cardano_blockchain_types::{
1010
};
1111
#[cfg(feature = "mimalloc")]
1212
use mimalloc::MiMalloc;
13+
use rbac_registration::cardano::cip509::Cip509;
1314

1415
/// Use Mimalloc for the global allocator.
1516
#[cfg(feature = "mimalloc")]
@@ -457,8 +458,15 @@ fn log_bad_cip36_info(block: &MultiEraBlock, network: Network) {
457458
}
458459

459460
/// Function for logging bad CIP509.
460-
fn log_bad_cip509_info(_block: &MultiEraBlock, _network: Network) {
461-
// TODO - Implement this function.
461+
fn log_bad_cip509_info(block: &MultiEraBlock, network: Network) {
462+
for cip509 in Cip509::from_block(block, &[]) {
463+
if cip509.report().is_problematic() {
464+
info!(
465+
network = network.to_string(),
466+
"CIP509 valid decoded, but have problem: {:?}", cip509
467+
);
468+
}
469+
}
462470
}
463471

464472
#[tokio::main]

0 commit comments

Comments
 (0)