You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
685 B

  1. package mock
  2. import (
  3. "github.com/tendermint/tendermint/internal/p2p"
  4. "github.com/tendermint/tendermint/internal/p2p/conn"
  5. "github.com/tendermint/tendermint/libs/log"
  6. )
  7. type Reactor struct {
  8. p2p.BaseReactor
  9. }
  10. func NewReactor() *Reactor {
  11. r := &Reactor{}
  12. r.BaseReactor = *p2p.NewBaseReactor("Mock-PEX", r)
  13. r.SetLogger(log.TestingLogger())
  14. return r
  15. }
  16. func (r *Reactor) GetChannels() []*conn.ChannelDescriptor { return []*conn.ChannelDescriptor{} }
  17. func (r *Reactor) AddPeer(peer p2p.Peer) {}
  18. func (r *Reactor) RemovePeer(peer p2p.Peer, reason interface{}) {}
  19. func (r *Reactor) Receive(chID byte, peer p2p.Peer, msgBytes []byte) {}