Skip to content

Commit

Permalink
additional logs to check query tx by hash
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Jun 13, 2023
1 parent 427835f commit 38bdb37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zetaclient/evm_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ func (ob *EVMChainClient) observeOutTx() {
break TRACKERLOOP
default:
receipt, transaction, err := ob.queryTxByHash(txHash.TxHash, int64(nonceInt))
if err != nil {
ob.logger.ObserveOutTx.Error().Err(err).Msgf("error querying tx by hash")
}
if err == nil && receipt != nil { // confirmed
ob.mu.Lock()
ob.outTXConfirmedReceipts[int(nonceInt)] = receipt
Expand Down Expand Up @@ -462,13 +465,15 @@ func (ob *EVMChainClient) queryTxByHash(txHash string, nonce int64) (*ethtypes.R

receipt, err := ob.EvmClient.TransactionReceipt(ctxt, ethcommon.HexToHash(txHash))
if err != nil {
logger.Warn().Err(err).Msg("TransactionReceipt error")
if err != ethereum.NotFound {
logger.Warn().Err(err).Msg("TransactionReceipt/TransactionByHash error")
logger.Warn().Err(err).Msg("TransactionReceipt error not NotFound")
}
return nil, nil, err
}
transaction, _, err := ob.EvmClient.TransactionByHash(ctxt, ethcommon.HexToHash(txHash))
if err != nil {
logger.Error().Err(err).Msg("TransactionByHash error")
return nil, nil, err
}
if transaction.Nonce() != uint64(nonce) {
Expand Down

0 comments on commit 38bdb37

Please sign in to comment.