Skip to content

Commit

Permalink
do not count 0 lamport accounts as rent-paying (solana-labs#26514)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Jul 12, 2022
1 parent 36bd46b commit 1db136a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7937,6 +7937,9 @@ impl AccountsDb {
account: &T,
rent_collector: &RentCollector,
) -> Option<u64> {
if account.lamports() == 0 {
return None;
}
(rent_collector.should_collect_rent(pubkey, account)
&& !rent_collector.get_rent_due(account).is_exempt())
.then(|| {
Expand Down

0 comments on commit 1db136a

Please sign in to comment.