Minor logging improvements
This commit is contained in:
parent
669282ae69
commit
84b3e12e1f
|
@ -457,7 +457,7 @@ pub fn bank_from_archive<P: AsRef<Path>>(
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if !bank.verify_snapshot_bank() {
|
if !bank.verify_snapshot_bank() {
|
||||||
panic!("Snapshot bank failed to verify");
|
panic!("Snapshot bank for slot {} failed to verify", bank.slot());
|
||||||
}
|
}
|
||||||
measure.stop();
|
measure.stop();
|
||||||
info!("{}", measure);
|
info!("{}", measure);
|
||||||
|
@ -530,7 +530,7 @@ where
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Rebuild accounts
|
info!("Rebuilding accounts...");
|
||||||
bank.set_bank_rc(
|
bank.set_bank_rc(
|
||||||
bank::BankRc::new(account_paths.to_vec(), 0, bank.slot()),
|
bank::BankRc::new(account_paths.to_vec(), 0, bank.slot()),
|
||||||
bank::StatusCacheRc::default(),
|
bank::StatusCacheRc::default(),
|
||||||
|
@ -546,15 +546,15 @@ where
|
||||||
&status_cache_path,
|
&status_cache_path,
|
||||||
MAX_SNAPSHOT_DATA_FILE_SIZE,
|
MAX_SNAPSHOT_DATA_FILE_SIZE,
|
||||||
|stream| {
|
|stream| {
|
||||||
// Rebuild status cache
|
info!("Rebuilding status cache...");
|
||||||
let slot_deltas: Vec<BankSlotDelta> = deserialize_from_snapshot(stream)?;
|
let slot_deltas: Vec<BankSlotDelta> = deserialize_from_snapshot(stream)?;
|
||||||
|
|
||||||
Ok(slot_deltas)
|
Ok(slot_deltas)
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
bank.src.append(&slot_deltas);
|
bank.src.append(&slot_deltas);
|
||||||
|
|
||||||
|
info!("Loaded bank for slot: {}", bank.slot());
|
||||||
Ok(bank)
|
Ok(bank)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1825,7 +1825,7 @@ impl Bank {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Recalculate the hash_internal_state from the account stores. Would be used to verify a
|
/// 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 {
|
pub fn verify_hash_internal_state(&self) -> bool {
|
||||||
self.rc
|
self.rc
|
||||||
.accounts
|
.accounts
|
||||||
|
|
Loading…
Reference in New Issue