Skip to content

Commit

Permalink
Minor logging improvements (bp #8140) (#8190)
Browse files Browse the repository at this point in the history
automerge
  • Loading branch information
mergify[bot] authored Feb 10, 2020
1 parent 33557c3 commit 7bd9501
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ledger/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ pub fn bank_from_archive<P: AsRef<Path>>(
)?;

if !bank.verify_snapshot_bank() {
panic!("Snapshot bank failed to verify");
panic!("Snapshot bank for slot {} failed to verify", bank.slot());
}
measure.stop();
info!("{}", measure);
Expand Down Expand Up @@ -532,7 +532,7 @@ where
)));
}
};
// Rebuild accounts
info!("Rebuilding accounts...");
bank.set_bank_rc(
bank::BankRc::new(account_paths.to_vec(), 0, bank.slot()),
bank::StatusCacheRc::default(),
Expand All @@ -548,16 +548,16 @@ where
&status_cache_path,
MAX_SNAPSHOT_DATA_FILE_SIZE,
|stream| {
// Rebuild status cache
info!("Rebuilding status cache...");
let slot_deltas: Vec<SlotDelta<transaction::Result<()>>> =
deserialize_from_snapshot(stream)?;

Ok(slot_deltas)
},
)?;

bank.src.append(&slot_deltas);

info!("Loaded bank for slot: {}", bank.slot());
Ok(bank)
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@ impl Bank {
}

/// Recalculate the hash_internal_state from the account stores. Would be used to verify a
/// snaphsot.
/// snapshot.
pub fn verify_hash_internal_state(&self) -> bool {
self.rc
.accounts
Expand Down

0 comments on commit 7bd9501

Please sign in to comment.