mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-25 09:24:30 +00:00
fixes from Jae's review
1. remove pointer 2. add Quit() method to Service interface
This commit is contained in:
+4
-4
@@ -534,10 +534,10 @@ OUTER_LOOP:
|
||||
// Send request and wait.
|
||||
bpr.pool.sendRequest(bpr.height, peer.id)
|
||||
select {
|
||||
case <-bpr.pool.Quit:
|
||||
case <-bpr.pool.Quit():
|
||||
bpr.Stop()
|
||||
return
|
||||
case <-bpr.Quit:
|
||||
case <-bpr.Quit():
|
||||
return
|
||||
case <-bpr.redoCh:
|
||||
bpr.reset()
|
||||
@@ -545,10 +545,10 @@ OUTER_LOOP:
|
||||
case <-bpr.gotBlockCh:
|
||||
// We got the block, now see if it's good.
|
||||
select {
|
||||
case <-bpr.pool.Quit:
|
||||
case <-bpr.pool.Quit():
|
||||
bpr.Stop()
|
||||
return
|
||||
case <-bpr.Quit:
|
||||
case <-bpr.Quit():
|
||||
return
|
||||
case <-bpr.redoCh:
|
||||
bpr.reset()
|
||||
|
||||
@@ -322,7 +322,7 @@ FOR_LOOP:
|
||||
}
|
||||
}
|
||||
continue FOR_LOOP
|
||||
case <-bcR.Quit:
|
||||
case <-bcR.Quit():
|
||||
break FOR_LOOP
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ func makeBlock(height int64, state sm.State) *types.Block {
|
||||
|
||||
// The Test peer
|
||||
type bcrTestPeer struct {
|
||||
*cmn.BaseService
|
||||
cmn.BaseService
|
||||
id p2p.ID
|
||||
ch chan interface{}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ func newbcrTestPeer(id p2p.ID) *bcrTestPeer {
|
||||
id: id,
|
||||
ch: make(chan interface{}, 2),
|
||||
}
|
||||
bcr.BaseService = cmn.NewBaseService(nil, "bcrTestPeer", bcr)
|
||||
bcr.BaseService = *cmn.NewBaseService(nil, "bcrTestPeer", bcr)
|
||||
return bcr
|
||||
}
|
||||
|
||||
@@ -196,4 +196,3 @@ func (tp *bcrTestPeer) IsOutbound() bool { return false }
|
||||
func (tp *bcrTestPeer) IsPersistent() bool { return true }
|
||||
func (tp *bcrTestPeer) Get(s string) interface{} { return s }
|
||||
func (tp *bcrTestPeer) Set(string, interface{}) {}
|
||||
func (tp *bcrTestPeer) QuitChan() <-chan struct{} { return tp.Quit }
|
||||
|
||||
Reference in New Issue
Block a user