Refactor instruction compilation and update message account key ordering (#23729)

* Refactor: Make instruction compilation usable for other message versions

* apply trents feedback

* Fix tests

* Fix bpf compatiblity
This commit is contained in:
Justin Starry
2022-03-21 20:53:32 +08:00
committed by GitHub
parent a1a29b0b86
commit 15357480ec
11 changed files with 1212 additions and 972 deletions

View File

@ -102,6 +102,11 @@ impl TransactionContext {
.ok_or(InstructionError::NotEnoughAccountKeys)
}
/// Returns the keys for the accounts loaded in this Transaction
pub fn get_keys_of_accounts(&self) -> &[Pubkey] {
&self.account_keys
}
/// Searches for an account by its key
pub fn get_account_at_index(
&self,