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
3 changes: 2 additions & 1 deletion cmd/devp2p/rlpxcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package main

import (
"errors"
"fmt"
"net"

Expand Down Expand Up @@ -49,7 +50,7 @@ func rlpxPing(ctx *cli.Context) error {
n := getNodeArg(ctx)
tcpEndpoint, ok := n.TCPEndpoint()
if !ok {
return fmt.Errorf("node has no TCP endpoint")
return errors.New("node has no TCP endpoint")
}
fd, err := net.Dial("tcp", tcpEndpoint.String())
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions p2p/enr/entries.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (v IPv4Addr) ENRKey() string { return "ip" }
func (v IPv4Addr) EncodeRLP(w io.Writer) error {
addr := netip.Addr(v)
if !addr.Is4() {
return fmt.Errorf("address is not IPv4")
return errors.New("address is not IPv4")
}
enc := rlp.NewEncoderBuffer(w)
bytes := addr.As4()
Expand All @@ -204,7 +204,7 @@ func (v IPv6Addr) ENRKey() string { return "ip6" }
func (v IPv6Addr) EncodeRLP(w io.Writer) error {
addr := netip.Addr(v)
if !addr.Is6() {
return fmt.Errorf("address is not IPv6")
return errors.New("address is not IPv6")
}
enc := rlp.NewEncoderBuffer(w)
bytes := addr.As16()
Expand Down