aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/message_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/message_test.go')
-rw-r--r--p2p/message_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/message_test.go b/p2p/message_test.go
index 8599b7e87..013214e21 100644
--- a/p2p/message_test.go
+++ b/p2p/message_test.go
@@ -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))
}