Skip to content

Commit

Permalink
Update eventHandler mock
Browse files Browse the repository at this point in the history
  • Loading branch information
psheth9 committed Jun 21, 2024
1 parent 7ac1ece commit 768e657
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/soroban-rpc/internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,11 @@ func MustNew(cfg *config.Config, logger *supportlog.Entry) *Daemon {

// mustInitializeStorage initializes the storage using what was on the DB
func (d *Daemon) mustInitializeStorage(cfg *config.Config) *feewindow.FeeWindows {

feewindows := feewindow.NewFeeWindows(cfg.ClassicFeeStatsLedgerRetentionWindow, cfg.SorobanFeeStatsLedgerRetentionWindow, cfg.NetworkPassphrase)
feewindows := feewindow.NewFeeWindows(
cfg.ClassicFeeStatsLedgerRetentionWindow,
cfg.SorobanFeeStatsLedgerRetentionWindow,
cfg.NetworkPassphrase,
)

readTxMetaCtx, cancelReadTxMeta := context.WithTimeout(context.Background(), cfg.IngestionTimeout)
defer cancelReadTxMeta()
Expand Down
4 changes: 4 additions & 0 deletions cmd/soroban-rpc/internal/db/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func (eventHandler *MockEventHandler) GetEvents(
return nil
}

func (eventHandler *MockEventHandler) GetLedgerRange(ctx context.Context) (ledgerbucketwindow.LedgerRange, error) {

Check failure on line 63 in cmd/soroban-rpc/internal/db/mocks.go

View workflow job for this annotation

GitHub Actions / golangci-lint

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
return ledgerbucketwindow.LedgerRange{}, nil
}

func (eventHandler *MockEventHandler) IngestEvents(lcm xdr.LedgerCloseMeta) error {
eventHandler.ledgerSeqToMeta[lcm.LedgerSequence()] = &lcm

Expand Down

0 comments on commit 768e657

Please sign in to comment.