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

@ -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 }