.owner -> .owner() (#16757)

* .owner -> .get_owner()

* use
This commit is contained in:
Jeff Washington (jwash)
2021-04-23 09:35:09 -05:00
committed by GitHub
parent 6c5b7ecf90
commit 5591cd6ef3
4 changed files with 57 additions and 57 deletions

View File

@@ -1038,7 +1038,7 @@ pub fn create_test_accounts(
for t in 0..num {
let pubkey = solana_sdk::pubkey::new_rand();
let account =
AccountSharedData::new((t + 1) as u64, 0, &AccountSharedData::default().owner);
AccountSharedData::new((t + 1) as u64, 0, AccountSharedData::default().owner());
accounts.store_slow_uncached(slot, &pubkey, &account);
pubkeys.push(pubkey);
}
@@ -1049,7 +1049,7 @@ pub fn create_test_accounts(
pub fn update_accounts_bench(accounts: &Accounts, pubkeys: &[Pubkey], slot: u64) {
for pubkey in pubkeys {
let amount = thread_rng().gen_range(0, 10);
let account = AccountSharedData::new(amount, 0, &AccountSharedData::default().owner);
let account = AccountSharedData::new(amount, 0, AccountSharedData::default().owner());
accounts.store_slow_uncached(slot, &pubkey, &account);
}
}
@@ -1995,12 +1995,12 @@ mod tests {
let accounts =
Accounts::new_with_config(Vec::new(), &ClusterType::Development, HashSet::new(), false);
let mut old_pubkey = Pubkey::default();
let zero_account = AccountSharedData::new(0, 0, &AccountSharedData::default().owner);
let zero_account = AccountSharedData::new(0, 0, AccountSharedData::default().owner());
info!("storing..");
for i in 0..2_000 {
let pubkey = solana_sdk::pubkey::new_rand();
let account =
AccountSharedData::new((i + 1) as u64, 0, &AccountSharedData::default().owner);
AccountSharedData::new((i + 1) as u64, 0, AccountSharedData::default().owner());
accounts.store_slow_uncached(i, &pubkey, &account);
accounts.store_slow_uncached(i, &old_pubkey, &zero_account);
old_pubkey = pubkey;