Add debug guard to catch invalid params (#20603)

This commit is contained in:
Jack May 2021-10-11 16:47:17 -07:00 committed by GitHub
parent a4c9b0f358
commit b0ee5d6cfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -507,6 +507,8 @@ impl MessageProcessor {
&fee_calculator,
);
let compute_meter = invoke_context.get_compute_meter();
debug_assert_eq!(program_indices.len(), message.instructions.len());
for (instruction_index, (instruction, program_indices)) in message
.instructions
.iter()