Skip to content

Commit

Permalink
fix solana test
Browse files Browse the repository at this point in the history
  • Loading branch information
Merculiar committed Jan 14, 2025
1 parent 3ce2f4f commit 8bc9f84
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ void main() {
);

const unitPriceMicroLamports = 1000;
const computeUnitLimit = 200000;

message = message.copyWith(
instructions: [
...message.instructions,
ComputeBudgetInstruction.setComputeUnitLimit(units: computeUnitLimit),
ComputeBudgetInstruction.setComputeUnitPrice(
microLamports: unitPriceMicroLamports,
),
Expand All @@ -60,11 +62,10 @@ void main() {
commitment: commitment,
);

const defaultUnitLimit = 200000;
const micro = 1000000;
expect(
feeWithComputeUnitPrice! - feeWithoutComputeUnitPrice!,
defaultUnitLimit * unitPriceMicroLamports / micro,
(computeUnitLimit * unitPriceMicroLamports) ~/ micro,
);
});
}

0 comments on commit 8bc9f84

Please sign in to comment.