diff --git a/cmd/data-node/commands/start/node_pre.go b/cmd/data-node/commands/start/node_pre.go index ad05210a9fd..9fe1312c5eb 100644 --- a/cmd/data-node/commands/start/node_pre.go +++ b/cmd/data-node/commands/start/node_pre.go @@ -184,7 +184,7 @@ func (l *NodeCommand) persistentPre([]string) (err error) { return fmt.Errorf("failed to verify chain id:%w", err) } - l.SetupSQLSubscribers(l.Log) + l.SetupSQLSubscribers() return nil } diff --git a/cmd/data-node/commands/start/sqlsubscribers.go b/cmd/data-node/commands/start/sqlsubscribers.go index fa2f17dd593..23d4468f06e 100644 --- a/cmd/data-node/commands/start/sqlsubscribers.go +++ b/cmd/data-node/commands/start/sqlsubscribers.go @@ -347,6 +347,8 @@ func (s *SQLSubscribers) SetupServices(ctx context.Context, log *logging.Logger, s.paidLiquidityFeesStatsService = service.NewPaidLiquidityFeesStats(s.paidLiquidityFeesStatsStore) s.partyLockedBalancesService = service.NewPartyLockedBalances(s.partyLockedBalancesStore) s.partyVestingBalancesService = service.NewPartyVestingBalances(s.partyVestingBalancesStore) + + s.transactionResultsSub = sqlsubscribers.NewTransactionResults(log) s.transactionResultsService = service.NewTransactionResults(s.transactionResultsSub) toInit := []interface{ Initialise(context.Context) error }{ @@ -364,7 +366,7 @@ func (s *SQLSubscribers) SetupServices(ctx context.Context, log *logging.Logger, return nil } -func (s *SQLSubscribers) SetupSQLSubscribers(log *logging.Logger) { +func (s *SQLSubscribers) SetupSQLSubscribers() { s.accountSub = sqlsubscribers.NewAccount(s.accountService) s.assetSub = sqlsubscribers.NewAsset(s.assetService) s.partySub = sqlsubscribers.NewParty(s.partyService) @@ -412,5 +414,4 @@ func (s *SQLSubscribers) SetupSQLSubscribers(log *logging.Logger) { s.volumeDiscountProgramSub = sqlsubscribers.NewVolumeDiscountProgram(s.volumeDiscountProgramService) s.paidLiquidityFeesStatsSub = sqlsubscribers.NewPaidLiquidityFeesStats(s.paidLiquidityFeesStatsService) s.vestingSummarySub = sqlsubscribers.NewVestingBalancesSummary(s.partyVestingBalancesStore, s.partyLockedBalancesStore) - s.transactionResultsSub = sqlsubscribers.NewTransactionResults(log) } diff --git a/datanode/networkhistory/service_test.go b/datanode/networkhistory/service_test.go index ebcbdd7ae89..4d1d42e2971 100644 --- a/datanode/networkhistory/service_test.go +++ b/datanode/networkhistory/service_test.go @@ -1327,7 +1327,7 @@ func setupSQLBroker(ctx context.Context, testDbConfig sqlstore.Config, snapshotS return nil, err } - subscribers.SetupSQLSubscribers(logging.NewTestLogger()) + subscribers.SetupSQLSubscribers() blockStore := sqlstore.NewBlocks(transactionalConnectionSource) if err != nil {