Add incinerator sysvar (#9815)

This commit is contained in:
Michael Vines
2020-04-30 22:04:08 -07:00
committed by GitHub
parent 450f1d2867
commit 8dfe0affd4
6 changed files with 62 additions and 9 deletions

View File

@@ -162,7 +162,7 @@ impl Accounts {
let (account, rent) = AccountsDB::load(storage, ancestors, accounts_index, key)
.and_then(|(mut account, _)| {
if message.is_writable(i) && !account.executable {
let rent_due = rent_collector.update(&mut account);
let rent_due = rent_collector.update(&key, &mut account);
Some((account, rent_due))
} else {
Some((account, 0))
@@ -664,7 +664,7 @@ impl Accounts {
if message.is_writable(i) {
if account.rent_epoch == 0 {
account.rent_epoch = rent_collector.epoch;
acc.2 += rent_collector.update(account);
acc.2 += rent_collector.update(&key, account);
}
accounts.push((key, &*account));
}