Browse Source

use NopEventBus

pull/1015/head
Ethan Buchman 7 years ago
parent
commit
537b0dfa1a
5 changed files with 5 additions and 5 deletions
  1. +1
    -1
      blockchain/reactor_test.go
  2. +1
    -1
      consensus/common_test.go
  3. +1
    -1
      consensus/replay_file.go
  4. +1
    -1
      consensus/wal_generator.go
  5. +1
    -1
      node/node.go

+ 1
- 1
blockchain/reactor_test.go View File

@ -32,7 +32,7 @@ func newBlockchainReactor(logger log.Logger, maxBlockHeight int64) *BlockchainRe
// Make the blockchainReactor itself
fastSync := true
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.SetLogger(logger.With("module", "blockchain"))


+ 1
- 1
consensus/common_test.go View File

@ -266,7 +266,7 @@ func newConsensusStateWithConfigAndBlockStore(thisConfig *cfg.Config, state sm.S
// Make ConsensusReactor
stateDB := dbm.NewMemDB() // XXX !!
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.SetLogger(log.TestingLogger())
cs.SetPrivValidator(pv)


+ 1
- 1
consensus/replay_file.go View File

@ -306,7 +306,7 @@ func newConsensusStateForReplay(config cfg.BaseConfig, csConfig *cfg.ConsensusCo
mempool, evpool := types.MockMempool{}, types.MockEvidencePool{}
blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(),
nil, proxyApp.Consensus(),
types.NopEventBus{}, proxyApp.Consensus(),
mempool, evpool)
consensusState := NewConsensusState(csConfig, state.Copy(), blockExec,


+ 1
- 1
consensus/wal_generator.go View File

@ -67,7 +67,7 @@ func WALWithNBlocks(numBlocks int) (data []byte, err error) {
defer eventBus.Stop()
mempool := types.MockMempool{}
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.SetLogger(logger)
consensusState.SetEventBus(eventBus)


+ 1
- 1
node/node.go View File

@ -219,7 +219,7 @@ func NewNode(config *cfg.Config,
blockExecLogger := logger.With("module", "state")
// make block executor for consensus and blockchain reactors to execute blocks
blockExec := sm.NewBlockExecutor(stateDB, blockExecLogger,
nil, proxyApp.Consensus(),
types.NopEventBus{}, proxyApp.Consensus(),
mempool, evidencePool)
// Make BlockchainReactor


Loading…
Cancel
Save