diff --git a/runtime/src/ancestors.rs b/runtime/src/ancestors.rs index 7960018cdf..830076d0b0 100644 --- a/runtime/src/ancestors.rs +++ b/runtime/src/ancestors.rs @@ -1,12 +1,23 @@ -use {crate::accounts_index::RollingBitField, solana_sdk::clock::Slot, std::collections::HashMap}; +use { + crate::accounts_index::RollingBitField, + core::fmt::{Debug, Formatter}, + solana_sdk::clock::Slot, + std::collections::HashMap, +}; pub type AncestorsForSerialization = HashMap; -#[derive(Debug, Clone, PartialEq, AbiExample)] +#[derive(Clone, PartialEq, AbiExample)] pub struct Ancestors { ancestors: RollingBitField, } +impl Debug for Ancestors { + fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { + write!(f, "{:?}", self.keys()) + } +} + // some tests produce ancestors ranges that are too large such // that we prefer to implement them in a sparse HashMap const ANCESTORS_HASH_MAP_SIZE: u64 = 8192;