mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 09:21:32 +00:00
Use rpc/client/ws_client; OnStart() returns error
This commit is contained in:
@ -8,7 +8,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
bc "github.com/tendermint/tendermint/blockchain"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/tendermint/consensus/types"
|
||||
@ -16,6 +15,7 @@ import (
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -49,13 +49,17 @@ func NewConsensusReactor(consensusState *ConsensusState, blockStore *bc.BlockSto
|
||||
return conR
|
||||
}
|
||||
|
||||
func (conR *ConsensusReactor) OnStart() {
|
||||
func (conR *ConsensusReactor) OnStart() error {
|
||||
log.Notice("ConsensusReactor ", "fastSync", conR.fastSync)
|
||||
conR.BaseReactor.OnStart()
|
||||
if !conR.fastSync {
|
||||
conR.conS.Start()
|
||||
_, err := conR.conS.Start()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
go conR.broadcastNewRoundStepRoutine()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (conR *ConsensusReactor) OnStop() {
|
||||
|
@ -158,7 +158,6 @@ import (
|
||||
"time"
|
||||
|
||||
acm "github.com/tendermint/tendermint/account"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
bc "github.com/tendermint/tendermint/blockchain"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/tendermint/consensus/types"
|
||||
@ -166,6 +165,7 @@ import (
|
||||
mempl "github.com/tendermint/tendermint/mempool"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -360,9 +360,10 @@ func (cs *ConsensusState) NewStepCh() chan *RoundState {
|
||||
return cs.newStepCh
|
||||
}
|
||||
|
||||
func (cs *ConsensusState) OnStart() {
|
||||
func (cs *ConsensusState) OnStart() error {
|
||||
cs.BaseService.OnStart()
|
||||
cs.scheduleRound0(cs.Height)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cs *ConsensusState) OnStop() {
|
||||
|
Reference in New Issue
Block a user