* Turns compute_units_consumed of ProcessInstructionResult into a &mut parameter. * Removes second nesting level from test_process_instruction_compute_budget(). * Makes test_process_cross_program and test_native_invoke symmetric. * Unifies test_process_cross_program(), test_native_invoke() and test_process_instruction_compute_budget() into test_process_instruction().
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							557d35ec79
						
					
				
				
					commit
					e529d03c11
				
			| @@ -276,14 +276,15 @@ impl solana_sdk::program_stubs::SyscallStubs for SyscallStubs { | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         let mut compute_units_consumed = 0; | ||||
|         invoke_context | ||||
|             .process_instruction( | ||||
|                 &instruction.data, | ||||
|                 &instruction_accounts, | ||||
|                 Some(&caller_write_privileges), | ||||
|                 &program_indices, | ||||
|                 &mut compute_units_consumed, | ||||
|             ) | ||||
|             .result | ||||
|             .map_err(|err| ProgramError::try_from(err).unwrap_or_else(|err| panic!("{}", err)))?; | ||||
|  | ||||
|         // Copy invoke_context accounts modifications into caller's account_info | ||||
|   | ||||
		Reference in New Issue
	
	Block a user