From 2ef1a09b8d8caa108fd0106170f9cde5b3c674ef Mon Sep 17 00:00:00 2001 From: smypmsa Date: Fri, 25 Apr 2025 07:33:44 +0000 Subject: [PATCH] fix: decrease tx CUs, add explicit commitment level for getLatestBlockhash --- src/core/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/client.py b/src/core/client.py index 4193064..6d5fd16 100644 --- a/src/core/client.py +++ b/src/core/client.py @@ -120,7 +120,7 @@ class SolanaClient: Recent blockhash as string """ client = await self.get_client() - response = await client.get_latest_blockhash() + response = await client.get_latest_blockhash(commitment="processed") return response.value.blockhash async def build_and_send_transaction( @@ -152,7 +152,7 @@ class SolanaClient: # Add priority fee instructions if applicable if priority_fee is not None: fee_instructions = [ - set_compute_unit_limit(100_000), # Default compute unit limit + set_compute_unit_limit(75_000), # Default compute unit limit set_compute_unit_price(priority_fee), ] instructions = fee_instructions + instructions