Skip to content

Commit

Permalink
filler: floor priority fee other places
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Dec 27, 2023
1 parent 10deb76 commit 74908c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
18 changes: 11 additions & 7 deletions src/bots/filler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1438,9 +1438,11 @@ export class FillerBot implements Bot {
units: 1_400_000,
}),
ComputeBudgetProgram.setComputeUnitPrice({
microLamports: Math.min(
this.priorityFeeSubscriber.maxPriorityFee * 1.2,
MAX_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS
microLamports: Number(
Math.min(
Math.floor(this.priorityFeeSubscriber.maxPriorityFee * 1.2),
MAX_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS
)
),
}),
];
Expand Down Expand Up @@ -1501,10 +1503,12 @@ export class FillerBot implements Bot {
units: 1_400_000,
}),
ComputeBudgetProgram.setComputeUnitPrice({
microLamports: Number(Math.min(
Math.floor(this.priorityFeeSubscriber.maxPriorityFee * 1.2),
MAX_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS
)),
microLamports: Number(
Math.min(
Math.floor(this.priorityFeeSubscriber.maxPriorityFee * 1.2),
MAX_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS
)
),
}),
];

Expand Down
8 changes: 5 additions & 3 deletions src/bots/spotFiller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1139,9 +1139,11 @@ export class SpotFillerBot implements Bot {
units: 1_400_000,
}),
ComputeBudgetProgram.setComputeUnitPrice({
microLamports: Math.min(
this.priorityFeeSubscriber.maxPriorityFee * 1.2,
MAX_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS
microLamports: Number(
Math.min(
Math.floor(this.priorityFeeSubscriber.maxPriorityFee * 1.2),
MAX_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS
)
),
}),
];
Expand Down

0 comments on commit 74908c3

Please sign in to comment.