|
3 | 3 | use crate::discriminator::DlpDiscriminator; |
4 | 4 | use pinocchio_log::log; |
5 | 5 | use solana_program::account_info::AccountInfo; |
| 6 | +use solana_program::declare_id; |
6 | 7 | use solana_program::entrypoint::ProgramResult; |
7 | 8 | use solana_program::program_error::ProgramError; |
8 | 9 | use solana_program::pubkey::Pubkey; |
9 | | -use solana_program::{declare_id, msg}; |
| 10 | + |
| 11 | +#[cfg(feature = "logging")] |
| 12 | +use solana_program::msg; |
10 | 13 |
|
11 | 14 | pub mod args; |
12 | 15 | pub mod consts; |
@@ -61,6 +64,9 @@ pub fn fast_process_instruction( |
61 | 64 | } |
62 | 65 | }; |
63 | 66 |
|
| 67 | + #[cfg(feature = "logging")] |
| 68 | + msg!("Processing instruction: {:?}", discriminator); |
| 69 | + |
64 | 70 | match discriminator { |
65 | 71 | DlpDiscriminator::Delegate => Some(processor::fast::process_delegate( |
66 | 72 | program_id, accounts, data, |
@@ -93,7 +99,6 @@ pub fn slow_process_instruction( |
93 | 99 | let (tag, data) = data.split_at(8); |
94 | 100 | let ix = DlpDiscriminator::try_from(tag[0]).or(Err(ProgramError::InvalidInstructionData))?; |
95 | 101 |
|
96 | | - msg!("Processing instruction: {:?}", ix); |
97 | 102 | match ix { |
98 | 103 | DlpDiscriminator::InitValidatorFeesVault => { |
99 | 104 | processor::process_init_validator_fees_vault(program_id, accounts, data)? |
|
0 commit comments