Skip to content

Commit

Permalink
fix(node): validator conn executor not started correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Jul 24, 2024
1 parent f215de2 commit 76c41c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ type nodeImpl struct {
shutdownOps closer
rpcEnv *rpccore.Environment
prometheusSrv *http.Server

// Dash
validatorConnExecutor *dashquorum.ValidatorConnExecutor
}

// newDefaultNode returns a Tendermint node with default settings for the
Expand Down Expand Up @@ -254,6 +251,8 @@ func makeNode(
if err != nil {
return nil, combineCloseError(err, makeCloser(closers))
}
} else {
logger.Debug("ProTxHash not set, so we are not a validator; skipping ValidatorConnExecutor initialization")
}

// TODO construct node here:
Expand All @@ -268,16 +267,14 @@ func makeNode(

eventSinks: eventSinks,
indexerService: indexerService,
services: []service.Service{eventBus},
services: []service.Service{eventBus, validatorConnExecutor},

initialState: state,
stateStore: stateStore,
blockStore: blockStore,

shutdownOps: makeCloser(closers),

validatorConnExecutor: validatorConnExecutor,

rpcEnv: &rpccore.Environment{
ProxyApp: proxyApp,

Expand Down
2 changes: 1 addition & 1 deletion node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ func TestNodeSetEventSink(t *testing.T) {

logger := log.NewNopLogger()

setupTest := func(t *testing.T, conf *config.Config) []indexer.EventSink {
setupTest := func(t *testing.T, _conf *config.Config) []indexer.EventSink {
eventBus := eventbus.NewDefault(logger.With("module", "events"))
require.NoError(t, eventBus.Start(ctx))

Expand Down

0 comments on commit 76c41c3

Please sign in to comment.