.lamports = <number> -> .set_lamports(<number>) (#16746)

This commit is contained in:
Jeff Washington (jwash)
2021-04-22 13:56:47 -05:00
committed by GitHub
parent 8a6b80095e
commit 333998d008
4 changed files with 19 additions and 19 deletions

View File

@ -31,7 +31,7 @@ use solana_runtime::{
snapshot_utils::SnapshotVersion,
};
use solana_sdk::{
account::{AccountSharedData, ReadableAccount},
account::{AccountSharedData, ReadableAccount, WritableAccount},
clock::{Epoch, Slot},
feature::{self, Feature},
feature_set,
@ -1899,14 +1899,14 @@ fn main() {
.get_program_accounts(&solana_stake_program::id())
.into_iter()
{
account.lamports = 0;
account.set_lamports(0);
bank.store_account(&address, &account);
}
}
for address in accounts_to_remove {
if let Some(mut account) = bank.get_account(&address) {
account.lamports = 0;
account.set_lamports(0);
bank.store_account(&address, &account);
}
}
@ -1932,7 +1932,7 @@ fn main() {
.get_program_accounts(&solana_vote_program::id())
.into_iter()
{
account.lamports = 0;
account.set_lamports(0);
bank.store_account(&address, &account);
}