add comments (#23275)
This commit is contained in:
committed by
GitHub
parent
05f04a22b7
commit
2996f1f783
@ -434,9 +434,9 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||||||
Self::update_stat(count, 1);
|
Self::update_stat(count, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to update an item in the slot list the given `slot` If an item for the slot
|
/// Try to update an item in the slot list the given `slot` If an item for the slot
|
||||||
// already exists in the list, remove the older item, add it to `reclaims`, and insert
|
/// already exists in the list, remove the older item, add it to `reclaims`, and insert
|
||||||
// the new item.
|
/// the new item.
|
||||||
pub fn lock_and_update_slot_list(
|
pub fn lock_and_update_slot_list(
|
||||||
current: &AccountMapEntryInner<T>,
|
current: &AccountMapEntryInner<T>,
|
||||||
new_value: (Slot, T),
|
new_value: (Slot, T),
|
||||||
@ -458,8 +458,10 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||||||
current.set_dirty(true);
|
current.set_dirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// modifies slot_list
|
/// modifies slot_list
|
||||||
// returns true if caller should addref
|
/// any entry at 'slot' is replaced with 'account_info'.
|
||||||
|
/// or, 'account_info' is appended to the slot list if the slot did not exist previously.
|
||||||
|
/// returns true if caller should addref
|
||||||
fn update_slot_list(
|
fn update_slot_list(
|
||||||
list: &mut SlotList<T>,
|
list: &mut SlotList<T>,
|
||||||
slot: Slot,
|
slot: Slot,
|
||||||
@ -591,8 +593,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// return tuple:
|
/// return true if item already existed in the index
|
||||||
/// true if item already existed in the index
|
|
||||||
fn upsert_on_disk(
|
fn upsert_on_disk(
|
||||||
&self,
|
&self,
|
||||||
vacant: VacantEntry<K, AccountMapEntry<T>>,
|
vacant: VacantEntry<K, AccountMapEntry<T>>,
|
||||||
|
Reference in New Issue
Block a user