Skip to content

Commit

Permalink
Linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdee committed Dec 26, 2022
1 parent 6298845 commit 4180fb8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion services/accountmanager/dirk/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func (*Service) fetchAccountsForWallet(ctx context.Context, wallet e2wtypes.Wall
}

// AccountByPublicKey returns the account for the given public key.
func (s *Service) AccountByPublicKey(ctx context.Context, pubkey phase0.BLSPubKey) (e2wtypes.Account, error) {
func (s *Service) AccountByPublicKey(_ context.Context, pubkey phase0.BLSPubKey) (e2wtypes.Account, error) {
s.mutex.RLock()
account, exists := s.accounts[pubkey]
s.mutex.RUnlock()
Expand Down
6 changes: 3 additions & 3 deletions services/blockrelay/configversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func (c *ConfigVersion) UnmarshalJSON(input []byte) error {
}

// String returns a string representation of the
func (c ConfigVersion) String() string {
if int(c) >= len(configVersionStrings) {
func (c *ConfigVersion) String() string {
if int(*c) >= len(configVersionStrings) {
return "unknown"
}
return configVersionStrings[c]
return configVersionStrings[*c]
}
2 changes: 1 addition & 1 deletion services/blockrelay/v1/executionconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (e *ExecutionConfig) UnmarshalJSON(input []byte) error {
if err != nil {
return errors.Wrap(err, "failed to decode public key")
}
pubKey := phase0.BLSPubKey{}
var pubKey phase0.BLSPubKey
if len(pubkey) != len(pubKey) {
return fmt.Errorf("public key has %d bytes, should have %d", len(pubkey), len(pubKey))
}
Expand Down
2 changes: 1 addition & 1 deletion services/blockrelay/v2/proposerconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (p *ProposerConfig) UnmarshalJSON(input []byte) error {
if len(tmp) != bellatrix.ExecutionAddressLength {
return errors.New("incorrect length for fee recipient")
}
feeRecipient := bellatrix.ExecutionAddress{}
var feeRecipient bellatrix.ExecutionAddress
copy(feeRecipient[:], tmp)
p.FeeRecipient = &feeRecipient
}
Expand Down

0 comments on commit 4180fb8

Please sign in to comment.