Add program_ids() methods
Added CompiledInstruction::program_id() so that we don't need to pass around instruction indexes just for Message::program_id(). Also added Message.program_ids() that returns a slice so that we can move those pubkeys into Message::account_keys.
This commit is contained in:
@@ -129,4 +129,8 @@ impl CompiledInstruction {
|
||||
accounts,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn program_id<'a>(&self, program_ids: &'a [Pubkey]) -> &'a Pubkey {
|
||||
&program_ids[self.program_ids_index as usize]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user