Skip to content

Commit 8a19850

Browse files
committed
priority_fee checks
1 parent 23d3da1 commit 8a19850

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/priority_fee.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,14 @@ pub fn apply_priority_fee(
216216
"Priority fee too large, Bug?"
217217
);
218218

219+
assert_ne!(compute_budget.compute_unit_limit, 0);
219220
instructions.push(
220221
compute_budget::ComputeBudgetInstruction::set_compute_unit_limit(
221222
compute_budget.compute_unit_limit,
222223
),
223224
);
224225

225-
if compute_budget.priority_fee_lamports() > 0 {
226+
if compute_budget.compute_unit_price_micro_lamports > 0 {
226227
instructions.push(
227228
compute_budget::ComputeBudgetInstruction::set_compute_unit_price(
228229
compute_budget.compute_unit_price_micro_lamports,

0 commit comments

Comments
 (0)