p2p: remove lookupIPFunc test hook and fix lint

This commit is contained in:
Lucas Vasconcelos 2024-12-04 15:58:45 +01:00
parent 163ff70159
commit e67f38aa29
2 changed files with 3 additions and 12 deletions

View file

@ -22,12 +22,13 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/ethereum/go-ethereum/p2p/enr"
"github.com/ethereum/go-ethereum/rlp"
"math/bits"
"net"
"net/netip"
"strings"
"github.com/ethereum/go-ethereum/p2p/enr"
"github.com/ethereum/go-ethereum/rlp"
)
var errMissingPrefix = errors.New("missing 'enr:' prefix for base64-encoded record")

View file

@ -18,7 +18,6 @@ package enode
import (
"crypto/ecdsa"
"errors"
"net"
"reflect"
"strings"
@ -28,15 +27,6 @@ import (
"github.com/ethereum/go-ethereum/p2p/enr"
)
func init() {
lookupIPFunc = func(name string) ([]net.IP, error) {
if name == "node.example.org" {
return []net.IP{{33, 44, 55, 66}}, nil
}
return nil, errors.New("no such host")
}
}
var parseNodeTests = []struct {
input string
wantError string