This commit is contained in:
tilacog 2024-04-15 10:51:54 -03:00 committed by GitHub
commit 16afd7148e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -47,14 +47,14 @@ pub fn generate(program: &Program) -> proc_macro2::TokenStream {
///
/// The `entry` function here, defines the standard entry to a Solana
/// program, where execution begins.
pub fn entry<'info>(program_id: &Pubkey, accounts: &'info [AccountInfo<'info>], data: &[u8]) -> anchor_lang::solana_program::entrypoint::ProgramResult {
pub fn entry<'info>(program_id: &Pubkey, accounts: &[AccountInfo<'info>], data: &[u8]) -> anchor_lang::solana_program::entrypoint::ProgramResult {
try_entry(program_id, accounts, data).map_err(|e| {
e.log();
e.into()
})
}
fn try_entry<'info>(program_id: &Pubkey, accounts: &'info [AccountInfo<'info>], data: &[u8]) -> anchor_lang::Result<()> {
fn try_entry<'info>(program_id: &Pubkey, accounts: &[AccountInfo<'info>], data: &[u8]) -> anchor_lang::Result<()> {
#[cfg(feature = "anchor-debug")]
{
msg!("anchor-debug is active");