Disable cross-program invocations for OperatingMode::Stable (#11272)

This commit is contained in:
Jack May
2020-07-29 15:29:52 -07:00
committed by GitHub
parent cd043b5d70
commit 2dbed80e48
7 changed files with 56 additions and 3 deletions

View File

@ -326,6 +326,9 @@ mod tests {
fn get_logger(&self) -> Rc<RefCell<dyn Logger>> {
Rc::new(RefCell::new(self.mock_logger.clone()))
}
fn is_cross_program_supported(&self) -> bool {
true
}
}
#[derive(Debug, Default, Clone)]
pub struct MockLogger {

View File

@ -794,6 +794,7 @@ fn call<'a>(
message_processor.add_program(*program_id, *process_instruction);
}
message_processor.add_loader(bpf_loader::id(), crate::process_instruction);
message_processor.set_cross_program_support(invoke_context.is_cross_program_supported());
#[allow(clippy::deref_addrof)]
match message_processor.process_cross_program_instruction(