Skip to content

Commit 3a83df4

Browse files
committed
fix: remove label
Signed-off-by: bkioshn <[email protected]>
1 parent 7a17e0d commit 3a83df4

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#[cfg(feature = "mimalloc")]
99
use mimalloc::MiMalloc;
10+
use rbac_registration::cardano::cip509;
1011

1112
/// Use Mimalloc for the global allocator.
1213
#[cfg(feature = "mimalloc")]
@@ -329,10 +330,7 @@ fn update_biggest_aux_data(
329330
None => 0,
330331
};
331332

332-
let raw_size_cip509 = match chain_update
333-
.data
334-
.txn_raw_metadata(tx_idx, Metadata::cip509::LABEL)
335-
{
333+
let raw_size_cip509 = match chain_update.data.txn_raw_metadata(tx_idx, cip509::LABEL) {
336334
Some(raw) => raw.len(),
337335
None => 0,
338336
};
@@ -368,10 +366,7 @@ fn log_bad_cip36_info(chain_update: &ChainUpdate, network: Network, tx_idx: usiz
368366

369367
/// Helper function for logging CIP509 validation.
370368
fn log_cip509_info(chain_update: &ChainUpdate, block_num: u64, network: Network, tx_idx: usize) {
371-
if let Some(decoded_metadata) = chain_update
372-
.data
373-
.txn_metadata(tx_idx, Metadata::cip509::LABEL)
374-
{
369+
if let Some(decoded_metadata) = chain_update.data.txn_metadata(tx_idx, cip509::LABEL) {
375370
info!("Block Number {}", block_num);
376371

377372
if let Metadata::DecodedMetadataValues::Cip509(cip509) = &decoded_metadata.value {

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ use std::sync::Arc;
66

77
use minicbor::{Decode, Decoder};
88
use pallas::ledger::traverse::MultiEraTx;
9-
use rbac_registration::cardano::cip509::{Cip509 as RbacRegCip509, Cip509Validation};
9+
use rbac_registration::cardano::cip509::{Cip509 as RbacRegCip509, Cip509Validation, LABEL};
1010

1111
use super::{
1212
DecodedMetadata, DecodedMetadataItem, DecodedMetadataValues, RawAuxData, ValidationReport,
1313
};
1414

15-
/// CIP509 label.
16-
pub const LABEL: u64 = 509;
17-
1815
/// CIP509 metadatum.
1916
#[derive(Debug, PartialEq, Clone, Default)]
2017
pub struct Cip509 {

0 commit comments

Comments
 (0)