mirror of https://github.com/status-im/op-geth.git
whisperv6: remove duplicated code (#18015)
This commit is contained in:
parent
a3fd415c0f
commit
7a5c1b28dd
|
@ -18,27 +18,12 @@ package whisperv6
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"crypto/ecdsa"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
mapset "github.com/deckarep/golang-set"
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMultipleTopicCopyInNewMessageFilter(t *testing.T) {
|
func TestMultipleTopicCopyInNewMessageFilter(t *testing.T) {
|
||||||
w := &Whisper{
|
w := New(nil)
|
||||||
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)
|
|
||||||
|
|
||||||
keyID, err := w.GenerateSymKey()
|
keyID, err := w.GenerateSymKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue