p2p: EIP-8 changes

This commit is contained in:
Felix Lange
2015-12-23 01:48:55 +01:00
parent ee1debda53
commit 7d8155714b
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))
}