Skip to content

Commit

Permalink
Asserts that program_id is always last in program chain.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Oct 11, 2021
1 parent b7d6240 commit cfa4e70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/src/message_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ impl<'a> InvokeContext for ThisInvokeContext<'a> {
.iter()
.position(|tuple| tuple.2 == key)
.unwrap_or(0);
assert_eq!(program_indices.len(), number_of_program_accounts + 1);
self.invoke_stack.push(InvokeContextStackFrame::new(
number_of_program_accounts,
create_keyed_accounts_unified(keyed_accounts.as_slice()),
Expand Down

0 comments on commit cfa4e70

Please sign in to comment.