parent
a61ddb6f61
commit
1e6b789bfa
|
@ -185,17 +185,17 @@ pub fn process_instruction(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
info!("Call BPF program");
|
info!("Call BPF program {}", program.unsigned_key());
|
||||||
match vm.execute_program(parameter_bytes.as_slice(), &[], &[heap_region]) {
|
match vm.execute_program(parameter_bytes.as_slice(), &[], &[heap_region]) {
|
||||||
Ok(status) => {
|
Ok(status) => {
|
||||||
if status != SUCCESS {
|
if status != SUCCESS {
|
||||||
let error: InstructionError = status.into();
|
let error: InstructionError = status.into();
|
||||||
warn!("BPF program failed: {}", error);
|
warn!("BPF program {} failed: {}", program.unsigned_key(), error);
|
||||||
return Err(error);
|
return Err(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
warn!("BPF program failed: {}", error);
|
warn!("BPF program {} failed: {}", program.unsigned_key(), error);
|
||||||
return match error {
|
return match error {
|
||||||
EbpfError::UserError(BPFError::HelperError(
|
EbpfError::UserError(BPFError::HelperError(
|
||||||
HelperError::InstructionError(error),
|
HelperError::InstructionError(error),
|
||||||
|
@ -206,7 +206,7 @@ pub fn process_instruction(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deserialize_parameters(parameter_accounts, ¶meter_bytes)?;
|
deserialize_parameters(parameter_accounts, ¶meter_bytes)?;
|
||||||
info!("BPF program success");
|
info!("BPF program {} success", program.unsigned_key());
|
||||||
} else if !keyed_accounts.is_empty() {
|
} else if !keyed_accounts.is_empty() {
|
||||||
match limited_deserialize(instruction_data)? {
|
match limited_deserialize(instruction_data)? {
|
||||||
LoaderInstruction::Write { offset, bytes } => {
|
LoaderInstruction::Write { offset, bytes } => {
|
||||||
|
|
Loading…
Reference in New Issue