Skip to content

Commit

Permalink
feat(bmr): Simplify trace log if transaction was not found (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-kl committed Nov 17, 2022
1 parent 79537e7 commit ec0f183
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/iconbridge/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package relay
import (
"context"
"fmt"
"strings"
"time"

"github.com/icon-project/icon-bridge/cmd/iconbridge/chain"
Expand Down Expand Up @@ -239,9 +240,14 @@ func (r *relay) Start(ctx context.Context) error {
default:
time.Sleep(relayTxReceiptWaitInterval) // wait before asking for receipt
if retryCount > retryWarnThreshold {
r.log.WithFields(log.Fields{"error": err, "retry": retryCount + 1}).Warn("tx.Receipt: retry")
r.log.WithFields(log.Fields{"error": err, "retry": retryCount + 1}).Warn("tx.Receipt: ")
} else {
r.log.WithFields(log.Fields{"error": err, "retry": retryCount + 1}).Debug("tx.Receipt: retry")
if strings.Contains(err.Error(), "not found") {
r.log.WithFields(log.Fields{"retry": retryCount + 1}).Debug("tx.Receipt: ")
} else {
r.log.WithFields(log.Fields{"error": err, "retry": retryCount + 1}).Debug("tx.Receipt: ")
}

}
}
retryCount++
Expand Down

0 comments on commit ec0f183

Please sign in to comment.