Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
urvisavla committed Nov 7, 2023
1 parent d99c816 commit 527172d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions services/horizon/internal/ingest/processor_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ func (s *ProcessorRunner) DisableMemoryStatsLogging() {

func buildChangeProcessor(
historyQ history.IngestionQ,
session db.SessionInterface,
changeStats *ingest.StatsChangeProcessor,
source ingestionSource,
ledgerSequence uint32,
Expand Down Expand Up @@ -240,7 +239,6 @@ func (s *ProcessorRunner) RunHistoryArchiveIngestion(
changeStats := ingest.StatsChangeProcessor{}
changeProcessor := buildChangeProcessor(
s.historyQ,
s.session,
&changeStats,
historyArchiveSource,
checkpointLedger,
Expand Down Expand Up @@ -406,7 +404,6 @@ func (s *ProcessorRunner) RunAllProcessorsOnLedger(ledger xdr.LedgerCloseMeta) (

groupChangeProcessors := buildChangeProcessor(
s.historyQ,
s.session,
&changeStatsProcessor,
ledgerSource,
ledger.LedgerSequence(),
Expand Down
4 changes: 2 additions & 2 deletions services/horizon/internal/ingest/processor_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func TestProcessorRunnerBuildChangeProcessor(t *testing.T) {
}

stats := &ingest.StatsChangeProcessor{}
processor := buildChangeProcessor(runner.historyQ, &db.MockSession{}, stats, ledgerSource, 123, "")
processor := buildChangeProcessor(runner.historyQ, stats, ledgerSource, 123, "")
assert.IsType(t, &groupChangeProcessors{}, processor)

assert.IsType(t, &statsChangeProcessor{}, processor.processors[0])
Expand All @@ -256,7 +256,7 @@ func TestProcessorRunnerBuildChangeProcessor(t *testing.T) {
filters: &MockFilters{},
}

processor = buildChangeProcessor(runner.historyQ, &db.MockSession{}, stats, historyArchiveSource, 456, "")
processor = buildChangeProcessor(runner.historyQ, stats, historyArchiveSource, 456, "")
assert.IsType(t, &groupChangeProcessors{}, processor)

assert.IsType(t, &statsChangeProcessor{}, processor.processors[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/stellar/go/ingest"
"github.com/stellar/go/services/horizon/internal/db2/history"
"github.com/stellar/go/support/db"
"github.com/stellar/go/xdr"
"github.com/stretchr/testify/suite"
)
Expand All @@ -26,7 +25,6 @@ type ClaimableBalancesChangeProcessorTestSuiteState struct {
mockQ *history.MockQClaimableBalances
mockClaimantsBatchInsertBuilder *history.MockClaimableBalanceClaimantBatchInsertBuilder
mockClaimableBalanceBatchInsertBuilder *history.MockClaimableBalanceBatchInsertBuilder
session db.SessionInterface
}

func (s *ClaimableBalancesChangeProcessorTestSuiteState) SetupTest() {
Expand Down Expand Up @@ -125,7 +123,6 @@ type ClaimableBalancesChangeProcessorTestSuiteLedger struct {
mockQ *history.MockQClaimableBalances
mockClaimantsBatchInsertBuilder *history.MockClaimableBalanceClaimantBatchInsertBuilder
mockClaimableBalanceBatchInsertBuilder *history.MockClaimableBalanceBatchInsertBuilder
session db.SessionInterface
}

func (s *ClaimableBalancesChangeProcessorTestSuiteLedger) SetupTest() {
Expand Down
4 changes: 2 additions & 2 deletions services/horizon/internal/ingest/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func TestStateVerifierLockBusy(t *testing.T) {
tt.Assert.NoError(q.BeginTx(tt.Ctx, &sql.TxOptions{}))

checkpointLedger := uint32(63)
changeProcessor := buildChangeProcessor(q, q, &ingest.StatsChangeProcessor{}, ledgerSource, checkpointLedger, "")
changeProcessor := buildChangeProcessor(q, &ingest.StatsChangeProcessor{}, ledgerSource, checkpointLedger, "")

gen := randxdr.NewGenerator()
var changes []xdr.LedgerEntryChange
Expand Down Expand Up @@ -331,7 +331,7 @@ func TestStateVerifier(t *testing.T) {
tt.Assert.NoError(q.BeginTx(tt.Ctx, &sql.TxOptions{}))

checkpointLedger := uint32(63)
changeProcessor := buildChangeProcessor(q, q, &ingest.StatsChangeProcessor{}, ledgerSource, checkpointLedger, "")
changeProcessor := buildChangeProcessor(q, &ingest.StatsChangeProcessor{}, ledgerSource, checkpointLedger, "")
mockChangeReader := &ingest.MockChangeReader{}

gen := randxdr.NewGenerator()
Expand Down

0 comments on commit 527172d

Please sign in to comment.