diff options
author | Corey Lin <514971757@qq.com> | 2018-12-03 21:15:22 +0800 |
---|---|---|
committer | Guillaume Ballet <gballet@gmail.com> | 2018-12-03 21:15:22 +0800 |
commit | 7a5c1b28ddd4ce1e95f6ed01672b9d44dba047f2 (patch) | |
tree | bfa64fc496c44680b470e2eea27f628107b539b3 | |
parent | a3fd415c0f983cae35c329d97e0b6707561daef6 (diff) | |
download | dexon-7a5c1b28ddd4ce1e95f6ed01672b9d44dba047f2.tar.gz dexon-7a5c1b28ddd4ce1e95f6ed01672b9d44dba047f2.tar.zst dexon-7a5c1b28ddd4ce1e95f6ed01672b9d44dba047f2.zip |
whisperv6: remove duplicated code (#18015)
-rw-r--r-- | whisper/whisperv6/api_test.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/whisper/whisperv6/api_test.go b/whisper/whisperv6/api_test.go index cdbc7fab5..6d7157f57 100644 --- a/whisper/whisperv6/api_test.go +++ b/whisper/whisperv6/api_test.go @@ -18,27 +18,12 @@ package whisperv6 import ( "bytes" - "crypto/ecdsa" "testing" "time" - - mapset "github.com/deckarep/golang-set" - "github.com/ethereum/go-ethereum/common" ) func TestMultipleTopicCopyInNewMessageFilter(t *testing.T) { - w := &Whisper{ - privateKeys: make(map[string]*ecdsa.PrivateKey), - symKeys: make(map[string][]byte), - envelopes: make(map[common.Hash]*Envelope), - expirations: make(map[uint32]mapset.Set), - peers: make(map[*Peer]struct{}), - messageQueue: make(chan *Envelope, messageQueueLimit), - p2pMsgQueue: make(chan *Envelope, messageQueueLimit), - quit: make(chan struct{}), - syncAllowance: DefaultSyncAllowance, - } - w.filters = NewFilters(w) + w := New(nil) keyID, err := w.GenerateSymKey() if err != nil { |