From 8bc9f84ec16396aa034ee01220c64faa9db49d43 Mon Sep 17 00:00:00 2001 From: Vlad Sumin Date: Tue, 14 Jan 2025 11:54:05 +0200 Subject: [PATCH] fix solana test --- .../test/programs/compute_budget_program/program_test.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/solana/test/programs/compute_budget_program/program_test.dart b/packages/solana/test/programs/compute_budget_program/program_test.dart index 99aa871c88..7605d0c7b5 100644 --- a/packages/solana/test/programs/compute_budget_program/program_test.dart +++ b/packages/solana/test/programs/compute_budget_program/program_test.dart @@ -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, ), @@ -60,11 +62,10 @@ void main() { commitment: commitment, ); - const defaultUnitLimit = 200000; const micro = 1000000; expect( feeWithComputeUnitPrice! - feeWithoutComputeUnitPrice!, - defaultUnitLimit * unitPriceMicroLamports / micro, + (computeUnitLimit * unitPriceMicroLamports) ~/ micro, ); }); }