Browse Source

mempool: remove Peer interface. use p2p.Peer

pull/592/head
Ethan Buchman 7 years ago
parent
commit
5b1f987ed1
1 changed files with 1 additions and 8 deletions
  1. +1
    -8
      mempool/reactor.go

+ 1
- 8
mempool/reactor.go View File

@ -100,17 +100,10 @@ type PeerState interface {
GetHeight() int64 GetHeight() int64
} }
// Peer describes a peer.
type Peer interface {
IsRunning() bool
Send(byte, interface{}) bool
Get(string) interface{}
}
// Send new mempool txs to peer. // Send new mempool txs to peer.
// TODO: Handle mempool or reactor shutdown? // TODO: Handle mempool or reactor shutdown?
// As is this routine may block forever if no new txs come in. // As is this routine may block forever if no new txs come in.
func (memR *MempoolReactor) broadcastTxRoutine(peer Peer) {
func (memR *MempoolReactor) broadcastTxRoutine(peer p2p.Peer) {
if !memR.config.Broadcast { if !memR.config.Broadcast {
return return
} }


Loading…
Cancel
Save