Custom debug impl for LoadedPrograms cache (#33808)
This commit is contained in:
parent
8260ffc1ef
commit
abf3b3e527
|
@ -443,7 +443,6 @@ impl Default for ProgramRuntimeEnvironments {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LoadedPrograms<FG: ForkGraph> {
|
||||
/// A two level index:
|
||||
///
|
||||
|
@ -459,6 +458,17 @@ pub struct LoadedPrograms<FG: ForkGraph> {
|
|||
fork_graph: Option<Arc<RwLock<FG>>>,
|
||||
}
|
||||
|
||||
impl<FG: ForkGraph> Debug for LoadedPrograms<FG> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("LoadedPrograms")
|
||||
.field("root slot", &self.latest_root_slot)
|
||||
.field("root epoch", &self.latest_root_epoch)
|
||||
.field("stats", &self.stats)
|
||||
.field("cache", &self.entries)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<FG: ForkGraph> Default for LoadedPrograms<FG> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
|
|
@ -56,7 +56,6 @@ struct SetRootTimings {
|
|||
prune_remove_ms: i64,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct BankForks {
|
||||
banks: HashMap<Slot, BankWithScheduler>,
|
||||
descendants: HashMap<Slot, HashSet<Slot>>,
|
||||
|
|
Loading…
Reference in New Issue