Skip to content

Commit 2e5c09d

Browse files
committed
feature(examples): add block depth (security parameter) in result of certify command for blocks and transactionsV2
1 parent ced1c5f commit 2e5c09d

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

  • examples
    • client-cardano-block/src
    • client-cardano-transaction-v2/src

examples/client-cardano-block/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ pub fn log_certify_information(
9898
println!("Following Cardano blocks have been successfully certified by Mithril.");
9999
for block in verified_blocks.certified_blocks() {
100100
println!(
101-
r###"- block hash '{}', block number '{}', block slot '{}'"###,
102-
block.block_hash, block.block_number, block.slot_number
101+
r###"- block hash '{}', block number '{}', block slot '{}', block depth '{}'"###,
102+
block.block_hash,
103+
block.block_number,
104+
block.slot_number,
105+
verified_blocks.security_parameter()
103106
);
104107
}
105108
}

examples/client-cardano-transaction-v2/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@ pub fn log_certify_information(
106106
println!("Following Cardano transactions have been successfully certified by Mithril.");
107107
for transaction in verified_transactions.certified_transactions() {
108108
println!(
109-
r###"- transaction hash '{}', block hash '{}', block number '{}', transaction slot '{}'"###,
109+
r###"- transaction hash '{}', block hash '{}', block number '{}', transaction slot '{}', block depth '{}'"###,
110110
transaction.transaction_hash,
111111
transaction.block_hash,
112112
transaction.block_number,
113-
transaction.slot_number
113+
transaction.slot_number,
114+
verified_transactions.security_parameter()
114115
);
115116
}
116117
}

0 commit comments

Comments
 (0)