Refactoring: Move KeyedAccounts to InvokeContext (#15410)
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
This commit is contained in:
committed by
GitHub
parent
015bc034a5
commit
9dfcb921cf
@@ -788,7 +788,7 @@ mod tests {
|
||||
account::AccountSharedData,
|
||||
account_utils::StateMut,
|
||||
hash::hash,
|
||||
keyed_account::{get_signers, next_keyed_account},
|
||||
keyed_account::{get_signers, keyed_account_at_index},
|
||||
};
|
||||
use std::cell::RefCell;
|
||||
|
||||
@@ -1715,9 +1715,8 @@ mod tests {
|
||||
KeyedAccount::new(&authorized_withdrawer_pubkey, true, &withdrawer_account),
|
||||
];
|
||||
let signers: HashSet<Pubkey> = get_signers(keyed_accounts);
|
||||
let keyed_accounts = &mut keyed_accounts.iter();
|
||||
let vote_keyed_account = next_keyed_account(keyed_accounts).unwrap();
|
||||
let withdrawer_keyed_account = next_keyed_account(keyed_accounts).unwrap();
|
||||
let vote_keyed_account = keyed_account_at_index(keyed_accounts, 0).unwrap();
|
||||
let withdrawer_keyed_account = keyed_account_at_index(keyed_accounts, 1).unwrap();
|
||||
let res = withdraw(
|
||||
vote_keyed_account,
|
||||
lamports,
|
||||
|
Reference in New Issue
Block a user