Skip to content

Commit

Permalink
feat: hide validator ip
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed May 29, 2024
1 parent 71ecb7f commit f0e69f0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion node/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"math/big"
"net"
"net/http"
"strings"
"sync/atomic"
"time"

Expand Down Expand Up @@ -117,7 +118,18 @@ type validator struct {
}

func (n *validator) SendBid(ctx context.Context, args types.BidArgs) (common.Hash, error) {
return n.client.SendBid(ctx, args)
hash, err := n.client.SendBid(ctx, args)
if err != nil {
metrics.ChainError.Inc()
log.Errorw("failed to send bid", "err", err)

if strings.Contains(err.Error(), "timeout") {
err = errors.New("timeout when send bid to validator")
}

Check failure on line 129 in node/validator.go

View workflow job for this annotation

GitHub Actions / golang-lint (1.21.x, ubuntu-latest)

unnecessary trailing newline (whitespace)

Check failure on line 129 in node/validator.go

View workflow job for this annotation

GitHub Actions / golang-lint (1.21.x, ubuntu-latest)

unnecessary trailing newline (whitespace)
}

return hash, err
}

func (n *validator) MevRunning() bool {
Expand Down

0 comments on commit f0e69f0

Please sign in to comment.