AccountSharedData.set_data (#15781)

* account.set_data and resize_data

* remove data_resize
This commit is contained in:
Jeff Washington (jwash)
2021-03-11 16:40:45 -06:00
committed by GitHub
parent e1ceb430e3
commit 3419a5446e
9 changed files with 43 additions and 25 deletions

View File

@@ -6084,10 +6084,10 @@ pub mod tests {
let mut normal_account = AccountSharedData::new(1, 0, &AccountSharedData::default().owner);
normal_account.owner = inline_spl_token_v2_0::id();
normal_account.data = account_data_with_mint.clone();
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.data = account_data_with_mint;
zero_account.set_data(account_data_with_mint);
//store an account
accounts.store_uncached(0, &[(&pubkey1, &normal_account)]);