diff --git a/programs/bpf/benches/bpf_loader.rs b/programs/bpf/benches/bpf_loader.rs index d9b98988a9..cd1101dbdf 100644 --- a/programs/bpf/benches/bpf_loader.rs +++ b/programs/bpf/benches/bpf_loader.rs @@ -133,7 +133,9 @@ fn bench_program_alu(bencher: &mut Bencher) { } #[derive(Debug, Default)] -pub struct MockInvokeContext {} +pub struct MockInvokeContext { + key: Pubkey, +} impl InvokeContext for MockInvokeContext { fn push(&mut self, _key: &Pubkey) -> Result<(), InstructionError> { Ok(()) @@ -148,4 +150,7 @@ impl InvokeContext for MockInvokeContext { ) -> Result<(), InstructionError> { Ok(()) } + fn get_caller(&self) -> Result<&Pubkey, InstructionError> { + Ok(&self.key) + } }