Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
clean up commas
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored and HaoranYi committed Feb 7, 2024
1 parent 7e3d2a4 commit 4ba97fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions accounts-db/src/rent_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ mod tests {
let mut account_clone = account.clone();
assert_eq!(
rent_collector
.collect_from_existing_account(&Pubkey::default(), &mut account_clone,),
.collect_from_existing_account(&Pubkey::default(), &mut account_clone),
CollectedInfo::default()
);
assert_eq!(account_clone, account);
Expand All @@ -253,7 +253,7 @@ mod tests {
account_expected.set_rent_epoch(RENT_EXEMPT_RENT_EPOCH);
assert_eq!(
rent_collector
.collect_from_existing_account(&Pubkey::default(), &mut account_clone,),
.collect_from_existing_account(&Pubkey::default(), &mut account_clone),
CollectedInfo::default()
);
assert_eq!(account_clone, account_expected);
Expand All @@ -270,7 +270,7 @@ mod tests {
account_expected.set_rent_epoch(RENT_EXEMPT_RENT_EPOCH);
assert_eq!(
rent_collector
.collect_from_existing_account(&incinerator::id(), &mut account_clone,),
.collect_from_existing_account(&incinerator::id(), &mut account_clone),
CollectedInfo::default()
);
assert_eq!(account_clone, account_expected);
Expand All @@ -295,7 +295,7 @@ mod tests {
let mut account_clone = account.clone();
assert_eq!(
rent_collector
.collect_from_existing_account(&Pubkey::default(), &mut account_clone,),
.collect_from_existing_account(&Pubkey::default(), &mut account_clone),
CollectedInfo {
rent_amount: rent_due_expected,
account_data_len_reclaimed: 0
Expand All @@ -318,7 +318,7 @@ mod tests {
account_expected.set_rent_epoch(RENT_EXEMPT_RENT_EPOCH);
assert_eq!(
rent_collector
.collect_from_existing_account(&Pubkey::default(), &mut account_clone,),
.collect_from_existing_account(&Pubkey::default(), &mut account_clone),
CollectedInfo::default()
);
assert_eq!(account_clone, account_expected);
Expand All @@ -336,7 +336,7 @@ mod tests {
let mut account_clone = account.clone();
assert_eq!(
rent_collector
.collect_from_existing_account(&Pubkey::default(), &mut account_clone,),
.collect_from_existing_account(&Pubkey::default(), &mut account_clone),
CollectedInfo::default()
);
assert_eq!(account_clone, account);
Expand Down
4 changes: 4 additions & 0 deletions runtime/src/stakes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ impl Stakes<StakeAccount> {
/// full account state for respective stake pubkeys. get_account function
/// should return the account at the respective slot where stakes where
/// cached.
///
/// [recompute stake]: when we load the bank from snapshot. Only Stakes<Delegation> are stored, which only stores the stake delgation information.
/// The full accounts store has to be loaded from the account_db. However, the accounts_db only have the most recent updated accounts. We can't know the
/// stake cache before at the epoch boundary that are used to compute the rewards.
pub(crate) fn new<F>(stakes: &Stakes<Delegation>, get_account: F) -> Result<Self, Error>
where
F: Fn(&Pubkey) -> Option<AccountSharedData>,
Expand Down

0 comments on commit 4ba97fd

Please sign in to comment.