whsiper: refactoring

This commit is contained in:
Vlad
2018-02-27 23:38:20 +01:00
parent 014d8d9837
commit c733792be4
4 changed files with 22 additions and 61 deletions

View File

@@ -75,10 +75,6 @@ func TestWhisperBasic(t *testing.T) {
if len(mail) != 0 {
t.Fatalf("failed w.Envelopes().")
}
m := w.Messages("non-existent")
if len(m) != 0 {
t.Fatalf("failed w.Messages.")
}
derived := pbkdf2.Key([]byte(peerID), nil, 65356, aesKeyLength, sha256.New)
if !validateDataIntegrity(derived, aesKeyLength) {
@@ -593,7 +589,7 @@ func TestCustomization(t *testing.T) {
}
// check w.messages()
id, err := w.Subscribe(f)
_, err = w.Subscribe(f)
if err != nil {
t.Fatalf("failed subscribe with seed %d: %s.", seed, err)
}
@@ -602,11 +598,6 @@ func TestCustomization(t *testing.T) {
if len(mail) > 0 {
t.Fatalf("received premature mail")
}
mail = w.Messages(id)
if len(mail) != 2 {
t.Fatalf("failed to get whisper messages")
}
}
func TestSymmetricSendCycle(t *testing.T) {