Move native program entrypoint out of instruction_processor_utils (#8122)

This commit is contained in:
Jack May
2020-02-04 14:54:49 -08:00
committed by GitHub
parent b5a735878a
commit 15ab966ed1
6 changed files with 108 additions and 105 deletions

View File

@ -4,8 +4,8 @@ use serde::{Deserialize, Serialize};
use solana_sdk::{
account::{create_keyed_readonly_accounts, Account, KeyedAccount},
clock::Epoch,
entrypoint_native,
instruction::{CompiledInstruction, InstructionError},
instruction_processor_utils,
message::Message,
pubkey::Pubkey,
system_program,
@ -125,7 +125,7 @@ pub fn verify_account_changes(
pub type ProcessInstruction = fn(&Pubkey, &[KeyedAccount], &[u8]) -> Result<(), InstructionError>;
pub type SymbolCache = RwLock<HashMap<Vec<u8>, Symbol<instruction_processor_utils::Entrypoint>>>;
pub type SymbolCache = RwLock<HashMap<Vec<u8>, Symbol<entrypoint_native::Entrypoint>>>;
#[derive(Serialize, Deserialize)]
pub struct MessageProcessor {

View File

@ -6,8 +6,7 @@ use libloading::os::unix::*;
use libloading::os::windows::*;
use log::*;
use solana_sdk::{
account::KeyedAccount, instruction::InstructionError, instruction_processor_utils,
pubkey::Pubkey,
account::KeyedAccount, entrypoint_native, instruction::InstructionError, pubkey::Pubkey,
};
use std::{env, path::PathBuf, str};
@ -87,7 +86,7 @@ pub fn invoke_entrypoint(
let path = create_path(&name);
match library_open(&path) {
Ok(library) => unsafe {
let entrypoint: Symbol<instruction_processor_utils::Entrypoint> =
let entrypoint: Symbol<entrypoint_native::Entrypoint> =
match library.get(name.as_bytes()) {
Ok(s) => s,
Err(e) => {