whisper/whisperv6: fix staticcheck issues (#20288)

ChrisChinchilla-patch-3
Guillaume Ballet 5 years ago committed by Felix Lange
parent afe0b65405
commit 765fe446cf
  1. 3
      whisper/whisperv6/topic.go
  2. 2
      whisper/whisperv6/whisper.go

@ -19,7 +19,6 @@
package whisperv6
import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)
@ -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.

@ -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,

Loading…
Cancel
Save