Commit 7d815571 authored by Felix Lange's avatar Felix Lange

p2p: EIP-8 changes

parent ee1debda
...@@ -143,7 +143,8 @@ func TestEOFSignal(t *testing.T) { ...@@ -143,7 +143,8 @@ func TestEOFSignal(t *testing.T) {
} }
func unhex(str string) []byte { func unhex(str string) []byte {
b, err := hex.DecodeString(strings.Replace(str, "\n", "", -1)) r := strings.NewReplacer("\t", "", " ", "", "\n", "")
b, err := hex.DecodeString(r.Replace(str))
if err != nil { if err != nil {
panic(fmt.Sprintf("invalid hex string: %q", str)) panic(fmt.Sprintf("invalid hex string: %q", str))
} }
......
...@@ -56,6 +56,9 @@ type protoHandshake struct { ...@@ -56,6 +56,9 @@ type protoHandshake struct {
Caps []Cap Caps []Cap
ListenPort uint64 ListenPort uint64
ID discover.NodeID ID discover.NodeID
// Ignore additional fields (for forward compatibility).
Rest []rlp.RawValue `rlp:"tail"`
} }
// Peer represents a connected remote node. // Peer represents a connected remote node.
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment