Skip to content

Commit

Permalink
ledger-tool: Allow dead slots for slot command when metadata absent
Browse files Browse the repository at this point in the history
The slot command will reject dead slots by default. This behavior can be
overridden by passing --allow-dead-slots. Additionally, in the event
that transaction metadata is missing or the slot is incomplete in the
blockstore, a best effort attempt will be made to get as much data out
as possible.

This fallback case did not have the allow dead slots parameter plumbed
through, so hook it up to allow fetching dead, partial slots
  • Loading branch information
steviez committed Feb 11, 2025
1 parent c0c0a6f commit e65c39f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ledger-tool/src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,11 @@ pub fn output_slot(
Err(_) => {
// Transaction metadata could be missing, try to fetch just the
// entries and leave the metadata fields empty
let entries = blockstore.get_slot_entries(slot, /*shred_start_index:*/ 0)?;
let entries = blockstore.get_slot_entries_with_shred_info(
slot,
/*shred_start_index:*/ 0,
allow_dead_slots,
)?;

let blockhash = entries
.last()
Expand Down

0 comments on commit e65c39f

Please sign in to comment.