From af84dff9efa2e629d2052ba8d0aa1fb877e442da Mon Sep 17 00:00:00 2001 From: Jack May Date: Fri, 8 May 2020 12:51:27 -0700 Subject: [PATCH] nudge --- programs/bpf/c/src/invoked/instruction.h | 10 ++++++++++ programs/bpf_loader/src/syscalls.rs | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 programs/bpf/c/src/invoked/instruction.h diff --git a/programs/bpf/c/src/invoked/instruction.h b/programs/bpf/c/src/invoked/instruction.h new file mode 100644 index 0000000000..c63da79df6 --- /dev/null +++ b/programs/bpf/c/src/invoked/instruction.h @@ -0,0 +1,10 @@ +/** + * @brief Instruction definitions for the invoked program + */ + +const int TEST_VERIFY_TRANSLATIONS = 0; +const int TEST_RETURN_ERROR = 1; +const int TEST_DERIVED_SIGNERS = 2; +const int TEST_VERIFY_NESTED_SIGNERS = 3; +const int TEST_VERIFY_WRITER = 4; +const int TEST_NESTED_INVOKE = 5; diff --git a/programs/bpf_loader/src/syscalls.rs b/programs/bpf_loader/src/syscalls.rs index 6645f71554..9f4fbe2787 100644 --- a/programs/bpf_loader/src/syscalls.rs +++ b/programs/bpf_loader/src/syscalls.rs @@ -697,8 +697,7 @@ fn call<'a>( let callee_program_id = message.account_keys[callee_program_id_index]; let caller_program_id = invoke_context .get_caller() - .map_err(|err| SyscallError::InstructionError(err))? - .into(); + .map_err(SyscallError::InstructionError)?; let (accounts, refs) = syscall.translate_accounts( &message, account_infos_addr,