Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Commit fe4102c

Browse files
CoreyLinnolash
authored andcommitted
whisperv6: remove duplicated code (#18015)
1 parent df6e3f9 commit fe4102c

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

whisper/whisperv6/api_test.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,12 @@ package whisperv6
1818

1919
import (
2020
"bytes"
21-
"crypto/ecdsa"
2221
"testing"
2322
"time"
24-
25-
mapset "github.com/deckarep/golang-set"
26-
"github.com/ethereum/go-ethereum/common"
2723
)
2824

2925
func TestMultipleTopicCopyInNewMessageFilter(t *testing.T) {
30-
w := &Whisper{
31-
privateKeys: make(map[string]*ecdsa.PrivateKey),
32-
symKeys: make(map[string][]byte),
33-
envelopes: make(map[common.Hash]*Envelope),
34-
expirations: make(map[uint32]mapset.Set),
35-
peers: make(map[*Peer]struct{}),
36-
messageQueue: make(chan *Envelope, messageQueueLimit),
37-
p2pMsgQueue: make(chan *Envelope, messageQueueLimit),
38-
quit: make(chan struct{}),
39-
syncAllowance: DefaultSyncAllowance,
40-
}
41-
w.filters = NewFilters(w)
26+
w := New(nil)
4227

4328
keyID, err := w.GenerateSymKey()
4429
if err != nil {

0 commit comments

Comments
 (0)