Refactor: Move InstructionRecorder into TransactionContext (#22578)

* Moves InstructionRecorder into TransactionContext.

* Adds assertions for number_of_instructions_at_transaction_level.
This commit is contained in:
Alexander Meißner
2022-01-19 22:40:09 +01:00
committed by GitHub
parent 60850d71ce
commit b448472037
14 changed files with 108 additions and 106 deletions

View File

@ -1991,7 +1991,7 @@ fn read_and_verify_elf(program_location: &str) -> Result<Vec<u8>, Box<dyn std::e
let mut program_data = Vec::new();
file.read_to_end(&mut program_data)
.map_err(|err| format!("Unable to read program file: {}", err))?;
let mut transaction_context = TransactionContext::new(Vec::new(), 1);
let mut transaction_context = TransactionContext::new(Vec::new(), 1, 1);
let mut invoke_context = InvokeContext::new_mock(&mut transaction_context, &[]);
// Verify the program