Skip to content

Commit

Permalink
feat(CLI): Add command to get block digests by height
Browse files Browse the repository at this point in the history
  • Loading branch information
Sword-Smith committed Dec 12, 2024
1 parent f5ee1b0 commit e33d2ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bin/neptune-cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ enum Command {
/// one of: `genesis, tip, height/<n>, digest/<hex>`
block_selector: BlockSelector,
},
BlockDigestsByHeight {
height: u64,
},
Confirmations,
PeerInfo,
AllPunishedPeers,
Expand Down Expand Up @@ -453,6 +456,10 @@ async fn main() -> Result<()> {
None => println!("Not found"),
}
}
Command::BlockDigestsByHeight { height } => {
let digests = client.block_digests_by_height(ctx, height.into()).await?;
println!("{}", digests.iter().join("\n"));
}
Command::Confirmations => {
let val = client.confirmations(ctx).await?;
match val {
Expand Down

0 comments on commit e33d2ed

Please sign in to comment.