use Account for test since it borrows mut ref to data (#15852)
This commit is contained in:
parent
e35d738906
commit
e50f284658
|
@ -111,9 +111,14 @@ pub fn builtin_process_instruction(
|
||||||
set_invoke_context(invoke_context);
|
set_invoke_context(invoke_context);
|
||||||
|
|
||||||
// Copy all the accounts into a HashMap to ensure there are no duplicates
|
// Copy all the accounts into a HashMap to ensure there are no duplicates
|
||||||
let mut accounts: HashMap<Pubkey, AccountSharedData> = keyed_accounts
|
let mut accounts: HashMap<Pubkey, Account> = keyed_accounts
|
||||||
.iter()
|
.iter()
|
||||||
.map(|ka| (*ka.unsigned_key(), ka.account.borrow().clone()))
|
.map(|ka| {
|
||||||
|
(
|
||||||
|
*ka.unsigned_key(),
|
||||||
|
Account::from(ka.account.borrow().clone()),
|
||||||
|
)
|
||||||
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// Create shared references to each account's lamports/data/owner
|
// Create shared references to each account's lamports/data/owner
|
||||||
|
|
Loading…
Reference in New Issue