Skip to content

Commit ced1c5f

Browse files
committed
feature(client-CLI): show depth of the certification (security parameter) in certify table result for blocks and transactionsV2
1 parent 5e1952f commit ced1c5f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

  • mithril-client-cli/src/commands

mithril-client-cli/src/commands/cardano_block/certify.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Mithril may not have signed those blocks yet, please try again later."
159159
"block_hash": block.block_hash,
160160
"block_number": block.block_number,
161161
"slot_number": block.slot_number,
162+
"block_depth": verified_blocks.security_parameter(),
162163
})
163164
})
164165
.collect::<Vec<_>>()
@@ -185,6 +186,7 @@ No proof could be computed for some Cardano blocks. Mithril may not have signed
185186
block.block_hash.clone().cell(),
186187
format!("{}", block.block_number).cell(),
187188
format!("{}", block.slot_number).cell(),
189+
format!("{}", verified_blocks.security_parameter()).cell(),
188190
"✅".cell().justify(cli_table::format::Justify::Center),
189191
]
190192
})
@@ -193,6 +195,7 @@ No proof could be computed for some Cardano blocks. Mithril may not have signed
193195
block.clone().cell(),
194196
String::new().cell(),
195197
String::new().cell(),
198+
String::new().cell(),
196199
"❌".cell().justify(cli_table::format::Justify::Center),
197200
]
198201
}))
@@ -201,6 +204,7 @@ No proof could be computed for some Cardano blocks. Mithril may not have signed
201204
"Block Hash".cell(),
202205
"Block Number".cell(),
203206
"Slot Number".cell(),
207+
"Block depth".cell(),
204208
"Certified".cell(),
205209
]);
206210

mithril-client-cli/src/commands/cardano_transaction/certify/v2.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ fn log_certify_information(
112112
"block_hash": tx.block_hash,
113113
"block_number": tx.block_number,
114114
"slot_number": tx.slot_number,
115+
"block_depth": verified_transactions.security_parameter(),
115116
})
116117
})
117118
.collect::<Vec<_>>()
@@ -139,6 +140,7 @@ No proof could be computed for some Cardano transactions. Mithril may not have s
139140
tx.block_hash.clone().cell(),
140141
format!("{}", tx.block_number).cell(),
141142
format!("{}", tx.slot_number).cell(),
143+
format!("{}", verified_transactions.security_parameter()).cell(),
142144
"✅".cell().justify(cli_table::format::Justify::Center),
143145
]
144146
})
@@ -148,6 +150,7 @@ No proof could be computed for some Cardano transactions. Mithril may not have s
148150
String::new().cell(),
149151
String::new().cell(),
150152
String::new().cell(),
153+
String::new().cell(),
151154
"❌".cell().justify(cli_table::format::Justify::Center),
152155
]
153156
}))
@@ -157,6 +160,7 @@ No proof could be computed for some Cardano transactions. Mithril may not have s
157160
"Block Hash".cell(),
158161
"Block Number".cell(),
159162
"Slot Number".cell(),
163+
"Block depth".cell(),
160164
"Certified".cell(),
161165
]);
162166

0 commit comments

Comments
 (0)