Skip to content

Commit

Permalink
p2p: EIP-8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Feb 19, 2016
1 parent ee1debd commit 7d81557
Show file tree
Hide file tree
Showing 4 changed files with 443 additions and 149 deletions.
3 changes: 2 additions & 1 deletion p2p/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ func TestEOFSignal(t *testing.T) {
}

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 {
panic(fmt.Sprintf("invalid hex string: %q", str))
}
Expand Down
3 changes: 3 additions & 0 deletions p2p/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ type protoHandshake struct {
Caps []Cap
ListenPort uint64
ID discover.NodeID

// Ignore additional fields (for forward compatibility).
Rest []rlp.RawValue `rlp:"tail"`
}

// Peer represents a connected remote node.
Expand Down
Loading

0 comments on commit 7d81557

Please sign in to comment.