Skip to content

Commit

Permalink
whisper/whisperv6: fix staticcheck issues (ethereum#20288)
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet authored and enriquefynn committed Feb 15, 2021
1 parent 7827550 commit 5946e24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions whisper/whisperv6/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package whisperv6

import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)

Expand All @@ -43,7 +42,7 @@ func BytesToTopic(b []byte) (t TopicType) {

// String converts a topic byte array to a string representation.
func (t *TopicType) String() string {
return common.ToHex(t[:])
return hexutil.Encode(t[:])
}

// MarshalText returns the hex representation of t.
Expand Down
2 changes: 1 addition & 1 deletion whisper/whisperv6/whisper.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func (whisper *Whisper) getPeer(peerID []byte) (*Peer, error) {
return p, nil
}
}
return nil, fmt.Errorf("Could not find peer with ID: %x", peerID)
return nil, fmt.Errorf("could not find peer with ID: %x", peerID)
}

// AllowP2PMessagesFromPeer marks specific peer trusted,
Expand Down

0 comments on commit 5946e24

Please sign in to comment.