mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 13:51:21 +00:00
use NopEventBus
This commit is contained in:
@ -32,7 +32,7 @@ func newBlockchainReactor(logger log.Logger, maxBlockHeight int64) *BlockchainRe
|
|||||||
// Make the blockchainReactor itself
|
// Make the blockchainReactor itself
|
||||||
fastSync := true
|
fastSync := true
|
||||||
blockExec := sm.NewBlockExecutor(dbm.NewMemDB(), log.TestingLogger(),
|
blockExec := sm.NewBlockExecutor(dbm.NewMemDB(), log.TestingLogger(),
|
||||||
nil, nil, types.MockMempool{}, types.MockEvidencePool{})
|
types.NopEventBus{}, nil, types.MockMempool{}, types.MockEvidencePool{})
|
||||||
|
|
||||||
bcReactor := NewBlockchainReactor(state.Copy(), blockExec, blockStore, fastSync)
|
bcReactor := NewBlockchainReactor(state.Copy(), blockExec, blockStore, fastSync)
|
||||||
bcReactor.SetLogger(logger.With("module", "blockchain"))
|
bcReactor.SetLogger(logger.With("module", "blockchain"))
|
||||||
|
@ -266,7 +266,7 @@ func newConsensusStateWithConfigAndBlockStore(thisConfig *cfg.Config, state sm.S
|
|||||||
// Make ConsensusReactor
|
// Make ConsensusReactor
|
||||||
stateDB := dbm.NewMemDB() // XXX !!
|
stateDB := dbm.NewMemDB() // XXX !!
|
||||||
blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(),
|
blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(),
|
||||||
nil, proxyAppConnCon, mempool, evpool)
|
types.NopEventBus{}, proxyAppConnCon, mempool, evpool)
|
||||||
cs := NewConsensusState(thisConfig.Consensus, state, blockExec, blockStore, mempool, evpool)
|
cs := NewConsensusState(thisConfig.Consensus, state, blockExec, blockStore, mempool, evpool)
|
||||||
cs.SetLogger(log.TestingLogger())
|
cs.SetLogger(log.TestingLogger())
|
||||||
cs.SetPrivValidator(pv)
|
cs.SetPrivValidator(pv)
|
||||||
|
@ -306,7 +306,7 @@ func newConsensusStateForReplay(config cfg.BaseConfig, csConfig *cfg.ConsensusCo
|
|||||||
|
|
||||||
mempool, evpool := types.MockMempool{}, types.MockEvidencePool{}
|
mempool, evpool := types.MockMempool{}, types.MockEvidencePool{}
|
||||||
blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(),
|
blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(),
|
||||||
nil, proxyApp.Consensus(),
|
types.NopEventBus{}, proxyApp.Consensus(),
|
||||||
mempool, evpool)
|
mempool, evpool)
|
||||||
|
|
||||||
consensusState := NewConsensusState(csConfig, state.Copy(), blockExec,
|
consensusState := NewConsensusState(csConfig, state.Copy(), blockExec,
|
||||||
|
@ -67,7 +67,7 @@ func WALWithNBlocks(numBlocks int) (data []byte, err error) {
|
|||||||
defer eventBus.Stop()
|
defer eventBus.Stop()
|
||||||
mempool := types.MockMempool{}
|
mempool := types.MockMempool{}
|
||||||
evpool := types.MockEvidencePool{}
|
evpool := types.MockEvidencePool{}
|
||||||
blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(), nil, proxyApp.Consensus(), mempool, evpool)
|
blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(), types.NopEventBus{}, proxyApp.Consensus(), mempool, evpool)
|
||||||
consensusState := NewConsensusState(config.Consensus, state.Copy(), blockExec, blockStore, mempool, evpool)
|
consensusState := NewConsensusState(config.Consensus, state.Copy(), blockExec, blockStore, mempool, evpool)
|
||||||
consensusState.SetLogger(logger)
|
consensusState.SetLogger(logger)
|
||||||
consensusState.SetEventBus(eventBus)
|
consensusState.SetEventBus(eventBus)
|
||||||
|
@ -219,7 +219,7 @@ func NewNode(config *cfg.Config,
|
|||||||
blockExecLogger := logger.With("module", "state")
|
blockExecLogger := logger.With("module", "state")
|
||||||
// make block executor for consensus and blockchain reactors to execute blocks
|
// make block executor for consensus and blockchain reactors to execute blocks
|
||||||
blockExec := sm.NewBlockExecutor(stateDB, blockExecLogger,
|
blockExec := sm.NewBlockExecutor(stateDB, blockExecLogger,
|
||||||
nil, proxyApp.Consensus(),
|
types.NopEventBus{}, proxyApp.Consensus(),
|
||||||
mempool, evidencePool)
|
mempool, evidencePool)
|
||||||
|
|
||||||
// Make BlockchainReactor
|
// Make BlockchainReactor
|
||||||
|
Reference in New Issue
Block a user