From 859a7088bec1b317d65025b0a7bb5fb351bdc82a Mon Sep 17 00:00:00 2001 From: sdevkc <151651204+sdevkc@users.noreply.github.com> Date: Mon, 1 Jan 2024 06:42:17 +1300 Subject: [PATCH] Increase confirmation timeout to 90 seconds (#382) --- src/solana/rpc/api.py | 2 +- src/solana/rpc/async_api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solana/rpc/api.py b/src/solana/rpc/api.py index ee2bf755..cbfed693 100644 --- a/src/solana/rpc/api.py +++ b/src/solana/rpc/api.py @@ -1139,7 +1139,7 @@ def confirm_transaction( sleep_seconds: The number of seconds to sleep when polling the signature status. last_valid_block_height: The block height by which the transaction would become invalid. """ - timeout = time() + 30 + timeout = time() + 90 commitment_to_use = _COMMITMENT_TO_SOLDERS[commitment or self._commitment] commitment_rank = int(commitment_to_use) if last_valid_block_height: # pylint: disable=no-else-return diff --git a/src/solana/rpc/async_api.py b/src/solana/rpc/async_api.py index c6fa21dc..53bc01d8 100644 --- a/src/solana/rpc/async_api.py +++ b/src/solana/rpc/async_api.py @@ -1167,7 +1167,7 @@ async def confirm_transaction( raise TransactionExpiredBlockheightExceededError(f"{tx_sig} has expired: block height exceeded") return resp else: - timeout = time() + 30 + timeout = time() + 90 while time() < timeout: resp = await self.get_signature_statuses([tx_sig]) resp_value = resp.value[0]