Add convenience macro for native program entrypoint
This commit is contained in:
@@ -7,6 +7,7 @@ extern crate log;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
#[macro_use]
|
||||
extern crate solana_sdk;
|
||||
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
@@ -14,8 +15,8 @@ use std::sync::{Once, ONCE_INIT};
|
||||
|
||||
mod token_program;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn process(info: &mut [KeyedAccount], input: &[u8]) -> bool {
|
||||
solana_entrypoint!(entrypoint);
|
||||
fn entrypoint(info: &mut [KeyedAccount], input: &[u8]) -> bool {
|
||||
// env_logger can only be initialized once
|
||||
static INIT: Once = ONCE_INIT;
|
||||
INIT.call_once(env_logger::init);
|
||||
|
Reference in New Issue
Block a user