Feature check CPI up front (#11652)

This commit is contained in:
Jack May
2020-08-16 23:12:22 -07:00
committed by GitHub
parent 768b386f0a
commit 4196686acf

View File

@ -94,12 +94,10 @@ pub fn register_syscalls<'a>(
)?;
if invoke_context.is_cross_program_supported() {
vm.register_syscall_ex("sol_create_program_address", syscall_create_program_address)?;
}
// Cross-program invocation syscalls
let invoke_context = Rc::new(RefCell::new(invoke_context));
vm.register_syscall_with_context_ex(
"sol_invoke_signed_c",
Box::new(SyscallProcessSolInstructionC {
@ -114,6 +112,7 @@ pub fn register_syscalls<'a>(
invoke_context: invoke_context.clone(),
}),
)?;
}
// Memory allocator
let heap = vec![0_u8; DEFAULT_HEAP_SIZE];