mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 03:01:42 +00:00
Use rpc/client/ws_client; OnStart() returns error
This commit is contained in:
@ -68,10 +68,11 @@ func NewBlockPool(start int, requestsCh chan<- BlockRequest, timeoutsCh chan<- s
|
||||
return bp
|
||||
}
|
||||
|
||||
func (pool *BlockPool) OnStart() {
|
||||
func (pool *BlockPool) OnStart() error {
|
||||
pool.BaseService.OnStart()
|
||||
pool.repeater = NewRepeatTimer("", requestIntervalMS*time.Millisecond)
|
||||
go pool.run()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (pool *BlockPool) OnStop() {
|
||||
|
@ -7,12 +7,12 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
"github.com/tendermint/tendermint/events"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -76,12 +76,13 @@ func NewBlockchainReactor(state *sm.State, store *BlockStore, sync bool) *Blockc
|
||||
return bcR
|
||||
}
|
||||
|
||||
func (bcR *BlockchainReactor) OnStart() {
|
||||
func (bcR *BlockchainReactor) OnStart() error {
|
||||
bcR.BaseReactor.OnStart()
|
||||
if bcR.sync {
|
||||
bcR.pool.Start()
|
||||
go bcR.poolRoutine()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (bcR *BlockchainReactor) OnStop() {
|
||||
|
Reference in New Issue
Block a user