owner -> owner() (#16784)

This commit is contained in:
Jeff Washington (jwash) 2021-04-26 10:40:11 -05:00 committed by GitHub
parent c44812fa71
commit aeff911c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -1596,7 +1596,7 @@ mod tests {
assert_eq!(None, bank.get_account(&buffer_address)); assert_eq!(None, bank.get_account(&buffer_address));
let post_program_account = bank.get_account(&program_keypair.pubkey()).unwrap(); let post_program_account = bank.get_account(&program_keypair.pubkey()).unwrap();
assert_eq!(post_program_account.lamports, min_program_balance); assert_eq!(post_program_account.lamports, min_program_balance);
assert_eq!(post_program_account.owner, bpf_loader_upgradeable::id()); assert_eq!(post_program_account.owner(), &bpf_loader_upgradeable::id());
assert_eq!( assert_eq!(
post_program_account.data().len(), post_program_account.data().len(),
UpgradeableLoaderState::program_len().unwrap() UpgradeableLoaderState::program_len().unwrap()

View File

@ -422,7 +422,7 @@ mod tests {
let account = account.borrow(); let account = account.borrow();
assert_eq!(account.lamports, account_info.lamports()); assert_eq!(account.lamports, account_info.lamports());
assert_eq!(account.data(), &account_info.data.borrow()[..]); assert_eq!(account.data(), &account_info.data.borrow()[..]);
assert_eq!(&account.owner, account_info.owner); assert_eq!(account.owner(), account_info.owner);
assert_eq!(account.executable, account_info.executable); assert_eq!(account.executable, account_info.executable);
assert_eq!(account.rent_epoch, account_info.rent_epoch); assert_eq!(account.rent_epoch, account_info.rent_epoch);
@ -470,7 +470,7 @@ mod tests {
account.data(), account.data(),
de_keyed_account.try_account_ref().unwrap().data() de_keyed_account.try_account_ref().unwrap().data()
); );
assert_eq!(account.owner, de_keyed_account.owner().unwrap()); assert_eq!(*account.owner(), de_keyed_account.owner().unwrap());
assert_eq!(account.executable, de_keyed_account.executable().unwrap()); assert_eq!(account.executable, de_keyed_account.executable().unwrap());
assert_eq!(account.rent_epoch, de_keyed_account.rent_epoch().unwrap()); assert_eq!(account.rent_epoch, de_keyed_account.rent_epoch().unwrap());
} }
@ -494,7 +494,7 @@ mod tests {
let account = account.borrow(); let account = account.borrow();
assert_eq!(account.lamports, account_info.lamports()); assert_eq!(account.lamports, account_info.lamports());
assert_eq!(account.data(), &account_info.data.borrow()[..]); assert_eq!(account.data(), &account_info.data.borrow()[..]);
assert_eq!(&account.owner, account_info.owner); assert_eq!(account.owner(), account_info.owner);
assert_eq!(account.executable, account_info.executable); assert_eq!(account.executable, account_info.executable);
assert_eq!(account.rent_epoch, account_info.rent_epoch); assert_eq!(account.rent_epoch, account_info.rent_epoch);
} }
@ -529,7 +529,7 @@ mod tests {
account.data(), account.data(),
de_keyed_account.try_account_ref().unwrap().data() de_keyed_account.try_account_ref().unwrap().data()
); );
assert_eq!(account.owner, de_keyed_account.owner().unwrap()); assert_eq!(*account.owner(), de_keyed_account.owner().unwrap());
assert_eq!(account.executable, de_keyed_account.executable().unwrap()); assert_eq!(account.executable, de_keyed_account.executable().unwrap());
assert_eq!(account.rent_epoch, de_keyed_account.rent_epoch().unwrap()); assert_eq!(account.rent_epoch, de_keyed_account.rent_epoch().unwrap());
} }

View File

@ -8979,12 +8979,12 @@ pub(crate) mod tests {
// Post-processing filter // Post-processing filter
let indexed_accounts = bank let indexed_accounts = bank
.get_filtered_indexed_accounts(&IndexKey::ProgramId(program_id), |account| { .get_filtered_indexed_accounts(&IndexKey::ProgramId(program_id), |account| {
account.owner == program_id account.owner() == &program_id
}); });
assert!(indexed_accounts.is_empty()); assert!(indexed_accounts.is_empty());
let indexed_accounts = bank let indexed_accounts = bank
.get_filtered_indexed_accounts(&IndexKey::ProgramId(another_program_id), |account| { .get_filtered_indexed_accounts(&IndexKey::ProgramId(another_program_id), |account| {
account.owner == another_program_id account.owner() == &another_program_id
}); });
assert_eq!(indexed_accounts.len(), 1); assert_eq!(indexed_accounts.len(), 1);
assert_eq!(indexed_accounts[0], (address, new_account)); assert_eq!(indexed_accounts[0], (address, new_account));
@ -10885,7 +10885,7 @@ pub(crate) mod tests {
bank.get_balance(&inline_spl_token_v2_0::native_mint::id()), bank.get_balance(&inline_spl_token_v2_0::native_mint::id()),
4200000000 4200000000
); );
assert_eq!(native_mint_account.owner, inline_spl_token_v2_0::id()); assert_eq!(native_mint_account.owner(), &inline_spl_token_v2_0::id());
// MainnetBeta - Native mint blinks into existence at epoch 75 // MainnetBeta - Native mint blinks into existence at epoch 75
genesis_config.cluster_type = ClusterType::MainnetBeta; genesis_config.cluster_type = ClusterType::MainnetBeta;

View File

@ -571,7 +571,7 @@ mod tests {
); );
assert_eq!(from_account.borrow().lamports, 50); assert_eq!(from_account.borrow().lamports, 50);
assert_eq!(to_account.borrow().lamports, 50); assert_eq!(to_account.borrow().lamports, 50);
assert_eq!(to_account.borrow().owner, new_owner); assert_eq!(to_account.borrow().owner(), &new_owner);
assert_eq!(to_account.borrow().data(), &[0, 0]); assert_eq!(to_account.borrow().data(), &[0, 0]);
} }
@ -608,7 +608,7 @@ mod tests {
); );
assert_eq!(from_account.borrow().lamports, 50); assert_eq!(from_account.borrow().lamports, 50);
assert_eq!(to_account.borrow().lamports, 50); assert_eq!(to_account.borrow().lamports, 50);
assert_eq!(to_account.borrow().owner, new_owner); assert_eq!(to_account.borrow().owner(), &new_owner);
assert_eq!(to_account.borrow().data(), &[0, 0]); assert_eq!(to_account.borrow().data(), &[0, 0]);
} }