Fix rebase errors

This commit is contained in:
Guillaume Ballet 2019-11-07 18:38:20 +01:00
parent 37ff87ec29
commit e279338766
2 changed files with 0 additions and 5 deletions

View file

@ -71,14 +71,12 @@ func MustParseV4(rawurl string) *Node {
// enode://<hex node id>@10.3.58.6:30303?discport=30301
func ParseV4(rawurl string) (*Node, error) {
if m := incompleteNodeURL.FindStringSubmatch(rawurl); m != nil {
fmt.Println("m != nil")
id, err := parsePubkey(m[1])
if err != nil {
return nil, fmt.Errorf("invalid public key (%v)", err)
}
return NewV4(id, nil, 0, 0), nil
}
fmt.Println("parse complete")
return parseComplete(rawurl)
}

View file

@ -41,7 +41,6 @@ var parseNodeTests = []struct {
input string
wantError string
wantResult *Node
retries uint
}{
// Records
{
@ -74,7 +73,6 @@ var parseNodeTests = []struct {
{
input: "enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439@invalid.:3",
wantError: `no such host`,
retries: 2,
},
{
input: "enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439@127.0.0.1:foo",
@ -185,7 +183,6 @@ func TestParseNode(t *testing.T) {
}
if !reflect.DeepEqual(n, test.wantResult) {
t.Errorf("test %q:\n result mismatch:\ngot: %#v\nwant: %#v", test.input, n, test.wantResult)
continue
}
}
}