fixes from Jae's review

1. remove pointer
2. add Quit() method to Service interface
This commit is contained in:
Anton Kaliaev
2018-02-12 14:31:52 +04:00
parent f1c8489270
commit 2a24ae90c1
21 changed files with 38 additions and 46 deletions

View File

@@ -117,9 +117,9 @@ func (memR *MempoolReactor) broadcastTxRoutine(peer p2p.Peer) {
if next = memR.Mempool.TxsFront(); next == nil {
continue
}
case <-peer.QuitChan():
case <-peer.Quit():
return
case <-memR.Quit:
case <-memR.Quit():
return
}
}
@@ -146,9 +146,9 @@ func (memR *MempoolReactor) broadcastTxRoutine(peer p2p.Peer) {
case <-next.NextWaitChan():
// see the start of the for loop for nil check
next = next.Next()
case <-peer.QuitChan():
case <-peer.Quit():
return
case <-memR.Quit:
case <-memR.Quit():
return
}
}