dont run consensus state unless fast sync is off

This commit is contained in:
Ethan Buchman
2015-05-27 22:06:33 -04:00
committed by Jae Kwon
parent 057c8ef400
commit bb67fe0356
4 changed files with 20 additions and 26 deletions

View File

@ -87,16 +87,11 @@ func NewNode() *Node {
// Get ConsensusReactor
consensusState := consensus.NewConsensusState(state, blockStore, mempoolReactor)
consensusReactor := consensus.NewConsensusReactor(consensusState, blockStore)
consensusReactor := consensus.NewConsensusReactor(consensusState, blockStore, config.GetBool("fast_sync"))
if privValidator != nil {
consensusReactor.SetPrivValidator(privValidator)
}
// so the consensus reactor won't do anything until we're synced
if config.GetBool("fast_sync") {
consensusReactor.SetSyncing(true)
}
sw := p2p.NewSwitch()
sw.AddReactor("PEX", pexReactor)
sw.AddReactor("MEMPOOL", mempoolReactor)