add Debug trait to range for accounts index (#19531)
This commit is contained in:
parent
12dc8749cf
commit
82a6bbe068
|
@ -791,7 +791,7 @@ impl Accounts {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_to_collect_rent_eagerly<R: RangeBounds<Pubkey>>(
|
pub fn load_to_collect_rent_eagerly<R: RangeBounds<Pubkey> + std::fmt::Debug>(
|
||||||
&self,
|
&self,
|
||||||
ancestors: &Ancestors,
|
ancestors: &Ancestors,
|
||||||
range: R,
|
range: R,
|
||||||
|
|
|
@ -2733,7 +2733,7 @@ impl AccountsDb {
|
||||||
where
|
where
|
||||||
F: Fn(&mut A, Option<(&Pubkey, AccountSharedData, Slot)>),
|
F: Fn(&mut A, Option<(&Pubkey, AccountSharedData, Slot)>),
|
||||||
A: Default,
|
A: Default,
|
||||||
R: RangeBounds<Pubkey>,
|
R: RangeBounds<Pubkey> + std::fmt::Debug,
|
||||||
{
|
{
|
||||||
let mut collector = A::default();
|
let mut collector = A::default();
|
||||||
self.accounts_index.range_scan_accounts(
|
self.accounts_index.range_scan_accounts(
|
||||||
|
|
|
@ -850,7 +850,7 @@ impl<T: IsCached> AccountsIndex<T> {
|
||||||
) -> Result<(), ScanError>
|
) -> Result<(), ScanError>
|
||||||
where
|
where
|
||||||
F: FnMut(&Pubkey, (&T, Slot)),
|
F: FnMut(&Pubkey, (&T, Slot)),
|
||||||
R: RangeBounds<Pubkey>,
|
R: RangeBounds<Pubkey> + std::fmt::Debug,
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
let locked_removed_bank_ids = self.removed_bank_ids.lock().unwrap();
|
let locked_removed_bank_ids = self.removed_bank_ids.lock().unwrap();
|
||||||
|
@ -1073,7 +1073,7 @@ impl<T: IsCached> AccountsIndex<T> {
|
||||||
collect_all_unsorted: bool,
|
collect_all_unsorted: bool,
|
||||||
) where
|
) where
|
||||||
F: FnMut(&Pubkey, (&T, Slot)),
|
F: FnMut(&Pubkey, (&T, Slot)),
|
||||||
R: RangeBounds<Pubkey>,
|
R: RangeBounds<Pubkey> + std::fmt::Debug,
|
||||||
{
|
{
|
||||||
self.do_scan_accounts(
|
self.do_scan_accounts(
|
||||||
metric_name,
|
metric_name,
|
||||||
|
@ -1098,7 +1098,7 @@ impl<T: IsCached> AccountsIndex<T> {
|
||||||
collect_all_unsorted: bool,
|
collect_all_unsorted: bool,
|
||||||
) where
|
) where
|
||||||
F: FnMut(&Pubkey, (&T, Slot)),
|
F: FnMut(&Pubkey, (&T, Slot)),
|
||||||
R: RangeBounds<Pubkey>,
|
R: RangeBounds<Pubkey> + std::fmt::Debug,
|
||||||
{
|
{
|
||||||
// TODO: expand to use mint index to find the `pubkey_list` below more efficiently
|
// TODO: expand to use mint index to find the `pubkey_list` below more efficiently
|
||||||
// instead of scanning the entire range
|
// instead of scanning the entire range
|
||||||
|
@ -1291,7 +1291,7 @@ impl<T: IsCached> AccountsIndex<T> {
|
||||||
func: F,
|
func: F,
|
||||||
) where
|
) where
|
||||||
F: FnMut(&Pubkey, (&T, Slot)),
|
F: FnMut(&Pubkey, (&T, Slot)),
|
||||||
R: RangeBounds<Pubkey>,
|
R: RangeBounds<Pubkey> + std::fmt::Debug,
|
||||||
{
|
{
|
||||||
// Only the rent logic should be calling this, which doesn't need the safety checks
|
// Only the rent logic should be calling this, which doesn't need the safety checks
|
||||||
self.do_unchecked_scan_accounts(
|
self.do_unchecked_scan_accounts(
|
||||||
|
|
Loading…
Reference in New Issue