account.owner = X -> account.set_owner(X) (#16754)

This commit is contained in:
Jeff Washington (jwash)
2021-04-23 12:34:22 -05:00
committed by GitHub
parent 63436cc2bf
commit fb0b76c1f3
7 changed files with 23 additions and 14 deletions

View File

@@ -6687,10 +6687,10 @@ pub mod tests {
account_data_with_mint[..PUBKEY_BYTES].clone_from_slice(&(mint_key.to_bytes()));
let mut normal_account = AccountSharedData::new(1, 0, AccountSharedData::default().owner());
normal_account.owner = inline_spl_token_v2_0::id();
normal_account.set_owner(inline_spl_token_v2_0::id());
normal_account.set_data(account_data_with_mint.clone());
let mut zero_account = AccountSharedData::new(0, 0, AccountSharedData::default().owner());
zero_account.owner = inline_spl_token_v2_0::id();
zero_account.set_owner(inline_spl_token_v2_0::id());
zero_account.set_data(account_data_with_mint);
//store an account