[release/1.3.4] p2p: EIP-8 changes

Conflicts:
	p2p/rlpx.go
This commit is contained in:
Felix Lange
2015-12-23 01:48:55 +01:00
committed by Jeffrey Wilcke
parent b25da7c3f4
commit b5a0cf488c
4 changed files with 449 additions and 155 deletions

View File

@ -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))
}