refactor AccountsToStore (#34185)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
This commit is contained in:
parent
504f2ee892
commit
90b11a608b
|
@ -378,7 +378,7 @@ impl CurrentAncientAppendVec {
|
||||||
let accounts = accounts_to_store.get(storage_selector);
|
let accounts = accounts_to_store.get(storage_selector);
|
||||||
|
|
||||||
db.store_accounts_frozen(
|
db.store_accounts_frozen(
|
||||||
(self.slot(), accounts, accounts_to_store.slot),
|
(self.slot(), accounts, accounts_to_store.slot()),
|
||||||
None::<Vec<AccountHash>>,
|
None::<Vec<AccountHash>>,
|
||||||
self.append_vec(),
|
self.append_vec(),
|
||||||
None,
|
None,
|
||||||
|
|
|
@ -867,7 +867,7 @@ pub struct AccountsToStore<'a> {
|
||||||
/// if 'accounts' contains more items than can be contained in the primary storage, then we have to split these accounts.
|
/// if 'accounts' contains more items than can be contained in the primary storage, then we have to split these accounts.
|
||||||
/// 'index_first_item_overflow' specifies the index of the first item in 'accounts' that will go into the overflow storage
|
/// 'index_first_item_overflow' specifies the index of the first item in 'accounts' that will go into the overflow storage
|
||||||
index_first_item_overflow: usize,
|
index_first_item_overflow: usize,
|
||||||
pub slot: Slot,
|
slot: Slot,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> AccountsToStore<'a> {
|
impl<'a> AccountsToStore<'a> {
|
||||||
|
@ -915,6 +915,10 @@ impl<'a> AccountsToStore<'a> {
|
||||||
};
|
};
|
||||||
&self.accounts[range]
|
&self.accounts[range]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn slot(&self) -> Slot {
|
||||||
|
self.slot
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// capacity of an ancient append vec
|
/// capacity of an ancient append vec
|
||||||
|
|
Loading…
Reference in New Issue