Skip to content

Commit

Permalink
[goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Jul 17, 2024
1 parent 72dbf2b commit 9f409ed
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion core/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ require (
go.opentelemetry.io/otel/sdk v1.28.0
go.opentelemetry.io/otel/sdk/metric v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/sync v0.7.0
gorm.io/driver/sqlite v1.5.6
Expand Down Expand Up @@ -163,7 +164,6 @@ require (
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opentelemetry.io/otel/log v0.3.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
Expand Down
2 changes: 2 additions & 0 deletions core/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ func WithBackoff(ctx context.Context, doFunc RetryableFunc, configurators ...Wit
}

if config.exceedsMaxAttempts(attempts) {
// nolint: wrapcheck
return multierr.Append(ErrMaxAttempts, fmt.Errorf("after %d attempts (attempt errors: %w)", attempts, multierr.Combine(errs...)))
}
if config.exceedsMaxTime(startTime) {
// nolint: wrapcheck
return multierr.Append(ErrMaxTime, fmt.Errorf("after %s (max was %s) %w", time.Since(startTime).String(), config.maxAllAttemptsTime.String(), multierr.Combine(errs...)))
}

Expand Down
9 changes: 0 additions & 9 deletions services/rfq/guard/service/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ func (g *Guard) handleBridgeRequestedLog(parentCtx context.Context, req *fastbri

var bridgeTx fastbridge.IFastBridgeBridgeTransaction
call := func(ctx context.Context) error {
ctx, newSpan := g.metrics.Tracer().Start(parentCtx, "fetchBridgeTx", trace.WithAttributes(
attribute.String("transaction_id", hexutil.Encode(req.TransactionId[:])),
attribute.String("bridge_address", req.Raw.Address.String()),
))

defer func() {
metrics.EndSpanWithErr(newSpan, err)
}()

bridgeTx, err = fastBridge.GetBridgeTransaction(&bind.CallOpts{Context: ctx}, req.Request)
if err != nil {
return fmt.Errorf("could not get bridge transaction: %w", err)
Expand Down
9 changes: 0 additions & 9 deletions services/rfq/relayer/service/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ func (r *Relayer) handleBridgeRequestedLog(parentCtx context.Context, req *fastb

var bridgeTx fastbridge.IFastBridgeBridgeTransaction
call := func(parentCtx context.Context) error {

Check warning on line 74 in services/rfq/relayer/service/handlers.go

View check run for this annotation

Codecov / codecov/patch

services/rfq/relayer/service/handlers.go#L74

Added line #L74 was not covered by tests

Check failure on line 74 in services/rfq/relayer/service/handlers.go

View workflow job for this annotation

GitHub Actions / Lint (services/rfq)

unused-parameter: parameter 'parentCtx' seems to be unused, consider removing or renaming it as _ (revive)
ctx, newSpan := r.metrics.Tracer().Start(parentCtx, "fetchBridgeTx", trace.WithAttributes(
attribute.String("transaction_id", hexutil.Encode(req.TransactionId[:])),
attribute.String("bridge_address", req.Raw.Address.String()),
))

defer func() {
metrics.EndSpanWithErr(newSpan, err)
}()

bridgeTx, err = fastBridge.GetBridgeTransaction(&bind.CallOpts{Context: ctx}, req.Request)
if err != nil {
return fmt.Errorf("could not get bridge transaction: %w", err)
Expand Down

0 comments on commit 9f409ed

Please sign in to comment.