Don't bother paying 0 rent
This commit is contained in:
committed by
mergify[bot]
parent
1859fbeb30
commit
1fc7c1ecee
@ -2676,6 +2676,7 @@ impl Bank {
|
|||||||
} else {
|
} else {
|
||||||
rent_share
|
rent_share
|
||||||
};
|
};
|
||||||
|
if rent_to_be_paid > 0 {
|
||||||
let mut account = self.get_account(&pubkey).unwrap_or_default();
|
let mut account = self.get_account(&pubkey).unwrap_or_default();
|
||||||
account.lamports += rent_to_be_paid;
|
account.lamports += rent_to_be_paid;
|
||||||
self.store_account(&pubkey, &account);
|
self.store_account(&pubkey, &account);
|
||||||
@ -2687,6 +2688,7 @@ impl Bank {
|
|||||||
post_balance: account.lamports,
|
post_balance: account.lamports,
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
self.rewards.write().unwrap().append(&mut rewards);
|
self.rewards.write().unwrap().append(&mut rewards);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user