Replaces KeyedAccount
by BorrowedAccount
in system_instruction_processor
. (#23217)
* Adds InstructionContext::check_number_of_instruction_accounts() and InstructionContext::get_instruction_account_key(). Bases check_sysvar_account() on instuction account indices. * Adds instruction_account_indices enums to system_instruction_processor. * Reorders parameters and adds InstructionContext. * Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 1). * Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 2). * Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 3). * Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 4). * Replaces KeyedAccount by BorrowedAccount in system_instruction_processor (part 5). * Code cleanup
This commit is contained in:
committed by
GitHub
parent
970f543ef6
commit
ee7e411d68
@@ -12,9 +12,6 @@ use {
|
||||
std::collections::HashSet,
|
||||
};
|
||||
|
||||
pub const NONCE_ACCOUNT_INDEX: usize = 0;
|
||||
pub const WITHDRAW_TO_ACCOUNT_INDEX: usize = 1;
|
||||
|
||||
pub fn advance_nonce_account(
|
||||
invoke_context: &InvokeContext,
|
||||
instruction_context: &InstructionContext,
|
||||
@@ -353,6 +350,9 @@ mod test {
|
||||
};
|
||||
}
|
||||
|
||||
const NONCE_ACCOUNT_INDEX: usize = 0;
|
||||
const WITHDRAW_TO_ACCOUNT_INDEX: usize = 1;
|
||||
|
||||
macro_rules! set_invoke_context_blockhash {
|
||||
($invoke_context:expr, $seed:expr) => {
|
||||
$invoke_context.blockhash = hash(&bincode::serialize(&$seed).unwrap());
|
||||
|
Reference in New Issue
Block a user