do not count 0 lamport accounts as rent-paying (#26514)

This commit is contained in:
Jeff Washington (jwash) 2022-07-11 22:16:46 -05:00 committed by GitHub
parent 36bd46bece
commit 1db136a8be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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(|| {