Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Log root slots while processing ledger
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jan 3, 2020
1 parent 4fe0b11 commit 7002ccb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ledger/src/blocktree_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ fn process_pending_slots(
let mut fork_info = vec![];
let mut last_status_report = Instant::now();
let mut pending_slots = vec![];
let mut last_root_slot = root_bank.slot();
process_next_slots(
root_bank,
root_meta,
Expand All @@ -523,7 +524,10 @@ fn process_pending_slots(
let (slot, meta, bank, last_entry_hash) = pending_slots.pop().unwrap();

if last_status_report.elapsed() > Duration::from_secs(2) {
info!("processing ledger...slot {}", slot);
info!(
"processing ledger: slot={}, last root slot={}",
slot, last_root_slot
);
last_status_report = Instant::now();
}

Expand Down Expand Up @@ -557,10 +561,12 @@ fn process_pending_slots(
bank.squash();
pending_slots.clear();
fork_info.clear();
last_root_slot = slot;
}

trace!(
"Bank for slot {} is complete. {} bytes allocated",
"Bank for {}slot {} is complete. {} bytes allocated",
if last_root_slot == slot { "root " } else { "" },
slot,
allocated.since(initial_allocation)
);
Expand Down

0 comments on commit 7002ccb

Please sign in to comment.