Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed Jul 20, 2023
1 parent 2cd9cf7 commit d539b25
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ linters:
enable-all: true
disable:
- cyclop
- depguard
- forbidigo
- funlen
- gochecknoglobals
Expand Down Expand Up @@ -88,6 +89,10 @@ linters-settings:
# Because it's easier to read without the other fields.
#
- 'GetPayloadsFilters'
#
# Easier to read with only one of the versioned payloads.
#
- 'api.VersionedExecutionPayload'

#
# Structures outside our control that have a ton of settings. It doesn't
Expand Down
4 changes: 2 additions & 2 deletions common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ type BuilderGetValidatorsResponseEntry struct {

type BidTraceV2 struct {
apiv1.BidTrace
BlockNumber uint64 `json:"block_number,string" db:"block_number"`
NumTx uint64 `json:"num_tx,string" db:"num_tx"`
BlockNumber uint64 `db:"block_number" json:"block_number,string"`
NumTx uint64 `db:"num_tx" json:"num_tx,string"`
}

type BidTraceV2JSON struct {
Expand Down
2 changes: 1 addition & 1 deletion datastore/memcached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func testBuilderSubmitBlockRequest(pubkey phase0.BLSPubKey, signature phase0.BLS
}
case consensusspec.DataVersionDeneb:
fallthrough
case consensusspec.DataVersionPhase0, consensusspec.DataVersionAltair, consensusspec.DataVersionBellatrix:
case consensusspec.DataVersionUnknown, consensusspec.DataVersionPhase0, consensusspec.DataVersionAltair, consensusspec.DataVersionBellatrix:
fallthrough
default:
return common.BuilderSubmitBlockRequest{
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ github.com/alicebob/miniredis/v2 v2.30.4/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6u
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/attestantio/go-builder-client v0.3.0 h1:NY7pUNT070T3tx/N8hCaO5KpExvaVQhH//9zsgRh43M=
github.com/attestantio/go-builder-client v0.3.0/go.mod h1:DwesMTOqnCp4u+n3uZ+fWL8wwnSBZVD9VMIVPDR+AZE=
github.com/attestantio/go-builder-client v0.3.2-0.20230701110827-d0ecfee1ab62 h1:jtNd8modhHUKfgLcQBv6ajgBNldwkIXT4U2iqWtbyA0=
github.com/attestantio/go-builder-client v0.3.2-0.20230701110827-d0ecfee1ab62/go.mod h1:DwesMTOqnCp4u+n3uZ+fWL8wwnSBZVD9VMIVPDR+AZE=
github.com/avalonche/go-eth2-client v0.0.0-20230720050755-dfcc05c7f873 h1:IIDWbWmoIW6WuZLYFNDuyeoGGYIAvZ5oH3XuZa47hQs=
Expand Down
6 changes: 5 additions & 1 deletion services/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1410,8 +1410,12 @@ func (api *RelayAPI) handleGetPayload(w http.ResponseWriter, req *http.Request)
if err != nil {
log.WithError(err).Info("failed to get block number")
}
txs, err := getPayloadResp.Transactions()
if err != nil {
log.WithError(err).Info("failed to get transactions")
}
log = log.WithFields(logrus.Fields{
"numTx": getPayloadResp.Transactions(),
"numTx": len(txs),
"blockNumber": blockNumber,
})
log.Info("execution payload delivered")
Expand Down

0 comments on commit d539b25

Please sign in to comment.