Skip to content

Commit

Permalink
Skip txs that have 'error'
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan committed Dec 14, 2022
1 parent bc53abc commit 06a3703
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions discovery-provider/src/solana/solana_client_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def handle_get_sol_tx_info(client: Client, index: int):
tx_info: ConfirmedTransaction = client.get_transaction(
tx_sig, encoding
)
_check_unsupported_version(tx_info, tx_sig)
_check_error(tx_info, tx_sig)
if tx_info["result"] is not None:
return tx_info
# We currently only support "legacy" solana transactions. If we encounter
Expand Down Expand Up @@ -171,8 +171,8 @@ def raise_timeout(signum, frame):
raise TimeoutError


def _check_unsupported_version(tx, tx_sig):
if "error" in tx and tx["error"]["code"] == UNSUPPORTED_VERSION_ERROR_CODE:
def _check_error(tx, tx_sig):
if "error" in tx:
logger.error(
f"solana_client_manager.py | _check_unsupported_version | Transaction {tx_sig} version is unsupported"
)
Expand Down

0 comments on commit 06a3703

Please sign in to comment.