Skip to content

Commit

Permalink
527 bugs on night stands (#532)
Browse files Browse the repository at this point in the history
* Increase timeout for transaction confirmation on stands. #527
* ERROR->DEBUG when exception is part of logic.
  • Loading branch information
afalaleev authored Feb 1, 2022
1 parent 3c3abda commit 2c64464
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions proxy/plugin/solana_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self):
self.client = SolanaClient(SOLANA_URL)
self.db = IndexerDB()
self.db.set_client(self.client)

if PP_SOLANA_URL == SOLANA_URL:
self.gas_price_calculator = GasPriceCalculator(self.client)
else:
Expand Down Expand Up @@ -277,7 +277,7 @@ def eth_getTransactionCount(self, account, tag):
acc_info = getAccountInfo(self.client, EthereumAddress(account))
return hex(int.from_bytes(acc_info.trx_count, 'little'))
except Exception as err:
self.error("eth_getTransactionCount: Can't get account info: %s", err)
self.debug(f"eth_getTransactionCount: Can't get account info: {err}")
return hex(0)

def _getTransactionReceipt(self, tx):
Expand Down Expand Up @@ -391,7 +391,7 @@ def eth_sendRawTransaction(self, rawTrx):
self._log_transaction_error(err)
raise
except EthereumError as err:
self.error("eth_sendRawTransaction EthereumError:%s", err)
self.debug("eth_sendRawTransaction EthereumError: {err}")
raise
except Exception as err:
self.error("eth_sendRawTransaction type(err):%s, Exception:%s", type(err), err)
Expand Down
4 changes: 2 additions & 2 deletions proxy/run-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ "$CONFIG" == "ci" ]; then
[[ -z "$RETRY_ON_FAIL" ]] && export RETRY_ON_FAIL=10
[[ -z "$FINALIZED" ]] && export FINALIZED="finalized"
[[ -z "$START_SLOT" ]] && export START_SLOT="LATEST"
[[ -z "$CONFIRM_TIMEOUT" ]] && export CONFIRM_TIMEOUT=1
[[ -z "$CONFIRM_TIMEOUT" ]] && export CONFIRM_TIMEOUT=10
[[ -z "$PERM_ACCOUNT_LIMIT" ]] && export PERM_ACCOUNT_LIMIT=2
elif [ "$CONFIG" == "local" ]; then
[[ -z "$SOLANA_URL" ]] && export SOLANA_URL="http://localhost:8899"
Expand All @@ -27,7 +27,7 @@ elif [ "$CONFIG" == "local" ]; then
[[ -z "$RETRY_ON_FAIL" ]] && export RETRY_ON_FAIL=10
[[ -z "$FINALIZED" ]] && export FINALIZED="finalized"
[[ -z "$START_SLOT" ]] && export START_SLOT=0
[[ -z "$CONFIRM_TIMEOUT" ]] && export CONFIRM_TIMEOUT=5
[[ -z "$CONFIRM_TIMEOUT" ]] && export CONFIRM_TIMEOUT=10
[[ -z "$PERM_ACCOUNT_LIMIT" ]] && export PERM_ACCOUNT_LIMIT=2
elif [ "$CONFIG" == "devnet" ]; then
[[ -z "$SOLANA_URL" ]] && export SOLANA_URL="https://api.devnet.solana.com"
Expand Down

0 comments on commit 2c64464

Please sign in to comment.