Skip to content

Commit

Permalink
more log messages updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nadim-az committed Nov 8, 2024
1 parent ac39e95 commit 990e639
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hyperlane/relayer_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ func (r *RelayerRunner) Run(ctx context.Context) error {

isTransferValid, err := r.validateHyperlaneTransfer(ctx, transfer)
if err != nil {
lmt.Logger(ctx).Error(
"error validating hyperlane transfer",
lmt.Logger(ctx).Warn(
"failed to validate Hyperlane transfer- will retry validation on next interval",
zap.Error(err),
zap.Int64("transferId", transfer.ID),
zap.String("txHash", transfer.MessageSentTx),
Expand Down
8 changes: 7 additions & 1 deletion ordersettler/ordersettler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"math/big"
"strconv"
"strings"
"time"

dbtypes "github.com/skip-mev/go-fast-solver/db"
Expand Down Expand Up @@ -215,7 +216,7 @@ func (r *OrderSettler) verifyOrderSettlements(ctx context.Context) error {

if err = r.verifyOrderSettlement(ctx, settlement); err != nil {
lmt.Logger(ctx).Warn(
"error verifying order settlement",
"failed to verify order settlement",
zap.Error(err),
zap.String("orderID", settlement.OrderID),
zap.String("sourceChainID", settlement.SourceChainID),
Expand Down Expand Up @@ -395,6 +396,11 @@ func (r *OrderSettler) verifyOrderSettlement(ctx context.Context, settlement db.
if settlement.SettlementStatus == dbtypes.SettlementStatusPending {
gasCost, failure, err := destinationBridgeClient.GetTxResult(ctx, settlement.InitiateSettlementTx.String)
if err != nil {
// Check if the error is due to tx not found
if strings.Contains(err.Error(), "tx") && strings.Contains(err.Error(), "not found") && strings.Contains(err.Error(), settlement.InitiateSettlementTx.String) {
// Transaction not yet indexed, we'll check again later
return fmt.Errorf("transaction not yet indexed. will retry fetching next interval")
}
return fmt.Errorf("failed to fetch message received event: %w", err)
} else if failure != nil {
lmt.Logger(ctx).Error("tx failed", zap.String("failure", failure.String()))
Expand Down

0 comments on commit 990e639

Please sign in to comment.