Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions http/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func (s *Service) Proxy(ctx context.Context, req *http.Request) (*http.Response,
}

// proxy performs an HTTP proxy request using a reverse proxy and returns the response.
//
//nolint:revive
func (s *Service) proxy(ctx context.Context, req *http.Request) (*http.Response, error) {
endpoint := req.URL.Path
query := req.URL.Query().Encode()
Expand Down
4 changes: 2 additions & 2 deletions mock/beaconblockattestations.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ package mock
import (
"context"

"github.com/OffchainLabs/go-bitfield"
"github.com/attestantio/go-eth2-client/api"
"github.com/attestantio/go-eth2-client/spec"
"github.com/attestantio/go-eth2-client/spec/electra"
"github.com/attestantio/go-eth2-client/spec/phase0"
"github.com/prysmaticlabs/go-bitfield"
)

// BeaconBlockAttestations fetches a block's attestations given a block ID.
Expand All @@ -35,7 +35,7 @@ func (s *Service) BeaconBlockAttestations(ctx context.Context,
}

attestations := make([]*spec.VersionedAttestation, 4)
for i := uint64(0); i < 4; i++ {
for i := range uint64(4) {
aggregationBits := bitfield.NewBitlist(128)
aggregationBits.SetBitAt(i, true)
attestations[i] = &spec.VersionedAttestation{
Expand Down
3 changes: 2 additions & 1 deletion spec/bellatrix/executionpayload.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ func (e *ExecutionPayload) unpack(data *executionPayloadJSON) error {
baseFeePerGasBEBytes := baseFeePerGas.Bytes()
var baseFeePerGasLEBytes [32]byte
baseFeeLen := len(baseFeePerGasBEBytes)
for i := 0; i < baseFeeLen; i++ {
for i := range baseFeeLen {
//nolint:gosec
baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i]
}
copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:])
Expand Down
3 changes: 2 additions & 1 deletion spec/bellatrix/executionpayloadheader.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ func (e *ExecutionPayloadHeader) unpack(data *executionPayloadHeaderJSON) error
baseFeePerGasBEBytes := baseFeePerGas.Bytes()
var baseFeePerGasLEBytes [32]byte
baseFeeLen := len(baseFeePerGasBEBytes)
for i := 0; i < baseFeeLen; i++ {
for i := range baseFeeLen {
//nolint:gosec
baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i]
}
copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:])
Expand Down
3 changes: 2 additions & 1 deletion spec/capella/executionpayload.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ func (e *ExecutionPayload) unpack(data *executionPayloadJSON) error {
baseFeePerGasBEBytes := baseFeePerGas.Bytes()
var baseFeePerGasLEBytes [32]byte
baseFeeLen := len(baseFeePerGasBEBytes)
for i := 0; i < baseFeeLen; i++ {
for i := range baseFeeLen {
//nolint:gosec
baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i]
}
copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:])
Expand Down
3 changes: 2 additions & 1 deletion spec/capella/executionpayloadheader.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ func (e *ExecutionPayloadHeader) unpack(data *executionPayloadHeaderJSON) error
baseFeePerGasBEBytes := baseFeePerGas.Bytes()
var baseFeePerGasLEBytes [32]byte
baseFeeLen := len(baseFeePerGasBEBytes)
for i := 0; i < baseFeeLen; i++ {
for i := range baseFeeLen {
//nolint:gosec
baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i]
}
copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:])
Expand Down
Loading