Cleanup: InvokeContext accessors (#21574)

* Removes blockhash accessors from InvokeContext.

* Removes lamports_per_signature accessors from InvokeContext.

* Removes return_data accessors from InvokeContext.

* Removes feature_set accessor from InvokeContext.

* Removes instruction_recorders and instruction_index accessors from InvokeContext.

* Moves get_sysvars() into InvokeContext.

* Removes compute_meter parameter from InvokeContext::new().

* Removes InvokeContext::new_mock_with_sysvars_and_features().

* Removes InvokeContext::update_timing().
This commit is contained in:
Alexander Meißner
2021-12-03 12:15:22 +01:00
committed by GitHub
parent dab0e8fdc7
commit a9d5ef2055
14 changed files with 314 additions and 343 deletions

View File

@ -223,7 +223,7 @@ fn run_program(name: &str) -> u64 {
let mut instruction_count = 0;
let mut tracer = None;
for i in 0..2 {
invoke_context.set_return_data(Vec::new()).unwrap();
invoke_context.return_data = (*invoke_context.get_caller().unwrap(), Vec::new());
let mut parameter_bytes = parameter_bytes.clone();
{
let mut vm = create_vm(