Commit 765fe446 authored by Guillaume Ballet's avatar Guillaume Ballet Committed by Felix Lange

whisper/whisperv6: fix staticcheck issues (#20288)

parent afe0b654
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
package whisperv6 package whisperv6
import ( import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
) )
...@@ -43,7 +42,7 @@ func BytesToTopic(b []byte) (t TopicType) { ...@@ -43,7 +42,7 @@ func BytesToTopic(b []byte) (t TopicType) {
// String converts a topic byte array to a string representation. // String converts a topic byte array to a string representation.
func (t *TopicType) String() string { func (t *TopicType) String() string {
return common.ToHex(t[:]) return hexutil.Encode(t[:])
} }
// MarshalText returns the hex representation of t. // MarshalText returns the hex representation of t.
......
...@@ -352,7 +352,7 @@ func (whisper *Whisper) getPeer(peerID []byte) (*Peer, error) { ...@@ -352,7 +352,7 @@ func (whisper *Whisper) getPeer(peerID []byte) (*Peer, error) {
return p, nil 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, // AllowP2PMessagesFromPeer marks specific peer trusted,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment