github.com/status-im/status-go@v1.1.0/services/ext/node_mock.go (about) 1 package ext 2 3 import ( 4 "go.uber.org/zap" 5 6 "github.com/status-im/status-go/eth-node/types" 7 enstypes "github.com/status-im/status-go/eth-node/types/ens" 8 ) 9 10 type TestNodeWrapper struct { 11 whisper types.Whisper 12 waku types.Waku 13 } 14 15 func NewTestNodeWrapper(whisper types.Whisper, waku types.Waku) *TestNodeWrapper { 16 return &TestNodeWrapper{whisper: whisper, waku: waku} 17 } 18 19 func (w *TestNodeWrapper) NewENSVerifier(_ *zap.Logger) enstypes.ENSVerifier { 20 panic("not implemented") 21 } 22 23 func (w *TestNodeWrapper) GetWhisper(_ interface{}) (types.Whisper, error) { 24 return w.whisper, nil 25 } 26 27 func (w *TestNodeWrapper) GetWaku(_ interface{}) (types.Waku, error) { 28 return w.waku, nil 29 } 30 31 func (w *TestNodeWrapper) GetWakuV2(_ interface{}) (types.Waku, error) { 32 return w.waku, nil 33 } 34 35 func (w *TestNodeWrapper) PeersCount() int { 36 return 1 37 } 38 39 func (w *TestNodeWrapper) AddPeer(url string) error { 40 panic("not implemented") 41 } 42 43 func (w *TestNodeWrapper) RemovePeer(url string) error { 44 panic("not implemented") 45 }