mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
p2p: remove lookupIPFunc test hook and fix lint
This commit is contained in:
parent
163ff70159
commit
e67f38aa29
2 changed files with 3 additions and 12 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue