Don't bother paying 0 rent

This commit is contained in:
Michael Vines
2020-10-10 08:47:20 -07:00
committed by mergify[bot]
parent 1859fbeb30
commit 1fc7c1ecee

View File

@ -2676,6 +2676,7 @@ impl Bank {
} else {
rent_share
};
if rent_to_be_paid > 0 {
let mut account = self.get_account(&pubkey).unwrap_or_default();
account.lamports += rent_to_be_paid;
self.store_account(&pubkey, &account);
@ -2687,6 +2688,7 @@ impl Bank {
post_balance: account.lamports,
},
));
}
});
self.rewards.write().unwrap().append(&mut rewards);