Skip to content

Commit aaeacb1

Browse files
committed
fix: integration tests, have to compile dlp with logging feature
1 parent fea679f commit aaeacb1

File tree

2 files changed

+5
-4
lines changed
  • magicblock-committor-service/src/intent_executor
  • test-integration/schedulecommit/elfs

2 files changed

+5
-4
lines changed

magicblock-committor-service/src/intent_executor/error.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ impl From<MagicBlockRpcClientError> for TransactionStrategyExecutionError {
156156
}
157157

158158
impl TransactionStrategyExecutionError {
159-
// There's always 2 budget instructions in front
160-
const OFFSET: u8 = 2;
159+
/// Number of compute budget instructions prepended to every transaction.
160+
/// Used to map instruction indices back to task indices.
161+
const TASK_OFFSET: u8 = 2;
161162

162163
pub fn is_cpi_limit_error(&self) -> bool {
163164
matches!(self, Self::CpiLimitError(_, _))
@@ -184,7 +185,7 @@ impl TransactionStrategyExecutionError {
184185
| Self::CpiLimitError(
185186
TransactionError::InstructionError(index, _),
186187
_,
187-
) => index.checked_sub(Self::OFFSET),
188+
) => index.checked_sub(Self::TASK_OFFSET),
188189
_ => None,
189190
}
190191
}
@@ -235,7 +236,7 @@ impl TransactionStrategyExecutionError {
235236
let tx_err_helper = |instruction_err| -> TransactionError {
236237
TransactionError::InstructionError(index, instruction_err)
237238
};
238-
let Some(action_index) = index.checked_sub(Self::OFFSET) else {
239+
let Some(action_index) = index.checked_sub(Self::TASK_OFFSET) else {
239240
return Err(tx_err_helper(instruction_err));
240241
};
241242

1.33 KB
Binary file not shown.

0 commit comments

Comments
 (0)