From 4d241a5d75cb47ec260c6b977c9b771dcd868cf0 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Thu, 21 Sep 2017 13:42:02 +0200 Subject: [PATCH] whisper: Call Fatalf in symkey hash test a.s.a a discrepancy is found --- whisper/whisperv5/filter_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/whisper/whisperv5/filter_test.go b/whisper/whisperv5/filter_test.go index 2f3a679111..41ebb71146 100644 --- a/whisper/whisperv5/filter_test.go +++ b/whisper/whisperv5/filter_test.go @@ -152,16 +152,12 @@ func TestInstallSymKeyGeneratesHash(t *testing.T) { t.Fatalf("Error installing the filter: %v", err); } - identicalBytes := true for i, b := range filter.SymKeyHash { if b != initialSymKeyHash[i] { - identicalBytes = false + t.Fatalf("The filter's symmetric key hash was not properly generated by Install") break } } - if identicalBytes == false { - t.Fatalf("The filter's symmetric key hash was not properly generated by Install") - } } func TestComparePubKey(t *testing.T) {