use solana_entrypoint directly (#3518)
This commit is contained in:
parent
ca2ac1e5ea
commit
d497b99abb
|
@ -1,3 +1,3 @@
|
|||
use solana_budget_api::budget_processor::process_instruction;
|
||||
|
||||
solana_sdk::process_instruction_entrypoint!(process_instruction);
|
||||
solana_sdk::solana_entrypoint!(process_instruction);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
use solana_config_api::config_processor::process_instruction;
|
||||
|
||||
solana_sdk::process_instruction_entrypoint!(process_instruction);
|
||||
solana_sdk::solana_entrypoint!(process_instruction);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
use solana_exchange_api::exchange_processor::process_instruction;
|
||||
|
||||
solana_sdk::process_instruction_entrypoint!(process_instruction);
|
||||
solana_sdk::solana_entrypoint!(process_instruction);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
use solana_storage_api::storage_processor::process_instruction;
|
||||
|
||||
solana_sdk::process_instruction_entrypoint!(process_instruction);
|
||||
solana_sdk::solana_entrypoint!(process_instruction);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
use solana_token_api::token_processor::process_instruction;
|
||||
|
||||
solana_sdk::process_instruction_entrypoint!(process_instruction);
|
||||
solana_sdk::solana_entrypoint!(process_instruction);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
use solana_vote_api::vote_processor::process_instruction;
|
||||
|
||||
solana_sdk::process_instruction_entrypoint!(process_instruction);
|
||||
solana_sdk::solana_entrypoint!(process_instruction);
|
||||
|
|
|
@ -29,23 +29,3 @@ macro_rules! solana_entrypoint(
|
|||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Macro to define an entrypoint from a native `process_instruction` function.
|
||||
#[macro_export]
|
||||
macro_rules! process_instruction_entrypoint(
|
||||
($process_instruction:ident) => (
|
||||
solana_sdk::solana_entrypoint!(process_instruction_entrypoint);
|
||||
fn process_instruction_entrypoint(
|
||||
program_id: &solana_sdk::pubkey::Pubkey,
|
||||
keyed_accounts: &mut [solana_sdk::account::KeyedAccount],
|
||||
data: &[u8],
|
||||
tick_height: u64,
|
||||
) -> Result<(), solana_sdk::instruction::InstructionError> {
|
||||
solana_logger::setup();
|
||||
|
||||
log::trace!("process_instruction: {:?}", data);
|
||||
log::trace!("keyed_accounts: {:?}", keyed_accounts);
|
||||
$process_instruction(program_id, keyed_accounts, data, tick_height)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue