Skip to content

Commit

Permalink
Add comment for another unspoken eager collection subtlety (solana-la…
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun authored May 10, 2021
1 parent 81ad795 commit c616c34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3568,6 +3568,9 @@ impl Bank {
.collect_from_existing_account(&pubkey, &mut account);
// Store all of them unconditionally to purge old AppendVec,
// even if collected rent is 0 (= not updated).
// Also, there's another subtle side-effect from this: this
// ensures we verify the whole on-chain state (= all accounts)
// via the account delta hash slowly once per an epoch.
self.store_account(&pubkey, &account);
}
self.collected_rent.fetch_add(rent, Relaxed);
Expand Down

0 comments on commit c616c34

Please sign in to comment.