Skip to content

Commit 5f1231e

Browse files
committed
Tweaks to processors
1 parent 1f61242 commit 5f1231e

File tree

5 files changed

+21
-25
lines changed

5 files changed

+21
-25
lines changed

p-token/src/entrypoint.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,34 @@ pub(crate) fn inner_process_instruction(
110110

111111
process_mint_to(accounts, instruction_data)
112112
}
113+
// 8 - Burn
114+
8 => {
115+
#[cfg(feature = "logging")]
116+
pinocchio::msg!("Instruction: Burn");
117+
118+
process_burn(accounts, instruction_data)
119+
}
113120
// 9 - CloseAccount
114121
9 => {
115122
#[cfg(feature = "logging")]
116123
pinocchio::msg!("Instruction: CloseAccount");
117124

118125
process_close_account(accounts)
119126
}
127+
// 12 - TransferChecked
128+
12 => {
129+
#[cfg(feature = "logging")]
130+
pinocchio::msg!("Instruction: TransferChecked");
131+
132+
process_transfer_checked(accounts, instruction_data)
133+
}
134+
// 15 - BurnChecked
135+
15 => {
136+
#[cfg(feature = "logging")]
137+
pinocchio::msg!("Instruction: BurnChecked");
138+
139+
process_burn_checked(accounts, instruction_data)
140+
}
120141
// 16 - InitializeAccount2
121142
16 => {
122143
#[cfg(feature = "logging")]
@@ -182,13 +203,6 @@ fn inner_process_remaining_instruction(
182203

183204
process_set_authority(accounts, instruction_data)
184205
}
185-
// 8 - Burn
186-
8 => {
187-
#[cfg(feature = "logging")]
188-
pinocchio::msg!("Instruction: Burn");
189-
190-
process_burn(accounts, instruction_data)
191-
}
192206
// 10 - FreezeAccount
193207
10 => {
194208
#[cfg(feature = "logging")]
@@ -203,13 +217,6 @@ fn inner_process_remaining_instruction(
203217

204218
process_thaw_account(accounts)
205219
}
206-
// 12 - TransferChecked
207-
12 => {
208-
#[cfg(feature = "logging")]
209-
pinocchio::msg!("Instruction: TransferChecked");
210-
211-
process_transfer_checked(accounts, instruction_data)
212-
}
213220
// 13 - ApproveChecked
214221
13 => {
215222
#[cfg(feature = "logging")]
@@ -224,13 +231,6 @@ fn inner_process_remaining_instruction(
224231

225232
process_mint_to_checked(accounts, instruction_data)
226233
}
227-
// 15 - BurnChecked
228-
15 => {
229-
#[cfg(feature = "logging")]
230-
pinocchio::msg!("Instruction: BurnChecked");
231-
232-
process_burn_checked(accounts, instruction_data)
233-
}
234234
// 17 - SyncNative
235235
17 => {
236236
#[cfg(feature = "logging")]

p-token/src/processor/amount_to_ui_amount.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use {
1212
},
1313
};
1414

15-
#[inline(always)]
1615
pub fn process_amount_to_ui_amount(
1716
accounts: &[AccountInfo],
1817
instruction_data: &[u8],

p-token/src/processor/initialize_multisig2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use {
33
pinocchio::{account_info::AccountInfo, program_error::ProgramError, ProgramResult},
44
};
55

6-
#[inline(always)]
76
pub fn process_initialize_multisig2(
87
accounts: &[AccountInfo],
98
instruction_data: &[u8],

p-token/src/processor/ui_amount_to_amount.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use {
1111
},
1212
};
1313

14-
#[inline(always)]
1514
pub fn process_ui_amount_to_amount(
1615
accounts: &[AccountInfo],
1716
instruction_data: &[u8],

p-token/src/processor/withdraw_excess_lamports.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use {
1212
},
1313
};
1414

15-
#[inline(always)]
1615
#[allow(clippy::arithmetic_side_effects)]
1716
pub fn process_withdraw_excess_lamports(accounts: &[AccountInfo]) -> ProgramResult {
1817
let [source_account_info, destination_info, authority_info, remaining @ ..] = accounts else {

0 commit comments

Comments
 (0)