Remove deprecated solana_entrypoint macro (#7257)

This commit is contained in:
Jack May
2019-12-04 00:42:50 -08:00
committed by GitHub
parent 9077a94dfe
commit 9b172879a2
3 changed files with 76 additions and 88 deletions

View File

@ -89,22 +89,18 @@ pub fn invoke_entrypoint(
let path = create_path(&name);
match library_open(&path) {
Ok(library) => unsafe {
let entrypoint: Symbol<instruction_processor_utils::Entrypoint> = match library
.get(name.as_bytes())
{
Ok(s) => s,
Err(_) => match library.get(instruction_processor_utils::ENTRYPOINT.as_bytes()) {
let entrypoint: Symbol<instruction_processor_utils::Entrypoint> =
match library.get(name.as_bytes()) {
Ok(s) => s,
Err(e) => {
warn!(
"{:?}: Unable to find {:?} in program",
e,
instruction_processor_utils::ENTRYPOINT
"Unable to find entrypoint {:?} (error: {:?})",
name.as_bytes(),
e
);
return Err(InstructionError::GenericError);
}
},
};
};
let ret = entrypoint(program_id, params, ix_data);
symbol_cache
.write()