type PubkeyAccountSlot (#24503)
This commit is contained in:
parent
5eb1ba402f
commit
ef5e7cce6e
|
@ -58,6 +58,8 @@ use {
|
|||
},
|
||||
};
|
||||
|
||||
pub type PubkeyAccountSlot = (Pubkey, AccountSharedData, Slot);
|
||||
|
||||
#[derive(Debug, Default, AbiExample)]
|
||||
pub struct AccountLocks {
|
||||
write_locks: HashSet<Pubkey>,
|
||||
|
@ -930,11 +932,11 @@ impl Accounts {
|
|||
&self,
|
||||
ancestors: &Ancestors,
|
||||
bank_id: BankId,
|
||||
) -> ScanResult<Vec<(Pubkey, AccountSharedData, Slot)>> {
|
||||
) -> ScanResult<Vec<PubkeyAccountSlot>> {
|
||||
self.accounts_db.scan_accounts(
|
||||
ancestors,
|
||||
bank_id,
|
||||
|collector: &mut Vec<(Pubkey, AccountSharedData, Slot)>, some_account_tuple| {
|
||||
|collector: &mut Vec<PubkeyAccountSlot>, some_account_tuple| {
|
||||
if let Some((pubkey, account, slot)) = some_account_tuple
|
||||
.filter(|(_, account, _)| Self::is_loadable(account.lamports()))
|
||||
{
|
||||
|
|
|
@ -37,7 +37,10 @@
|
|||
use solana_sdk::recent_blockhashes_account;
|
||||
use {
|
||||
crate::{
|
||||
accounts::{AccountAddressFilter, Accounts, LoadedTransaction, TransactionLoadResult},
|
||||
accounts::{
|
||||
AccountAddressFilter, Accounts, LoadedTransaction, PubkeyAccountSlot,
|
||||
TransactionLoadResult,
|
||||
},
|
||||
accounts_db::{
|
||||
AccountShrinkThreshold, AccountsDbConfig, ErrorCounters, SnapshotStorages,
|
||||
ACCOUNTS_DB_CONFIG_FOR_BENCHMARKS, ACCOUNTS_DB_CONFIG_FOR_TESTING,
|
||||
|
@ -5767,9 +5770,7 @@ impl Bank {
|
|||
self.rc.accounts.account_indexes_include_key(key)
|
||||
}
|
||||
|
||||
pub fn get_all_accounts_with_modified_slots(
|
||||
&self,
|
||||
) -> ScanResult<Vec<(Pubkey, AccountSharedData, Slot)>> {
|
||||
pub fn get_all_accounts_with_modified_slots(&self) -> ScanResult<Vec<PubkeyAccountSlot>> {
|
||||
self.rc.accounts.load_all(&self.ancestors, self.bank_id)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue