Skip to content

Commit 70dd1a7

Browse files
committed
loopdb: remove unused method ConfirmBatch
1 parent e03ba71 commit 70dd1a7

File tree

6 files changed

+0
-50
lines changed

6 files changed

+0
-50
lines changed

loopdb/sqlc/batch.sql.go

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loopdb/sqlc/querier.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loopdb/sqlc/queries/batch.sql

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ UPDATE sweep_batches SET
3737
last_rbf_sat_per_kw = $6
3838
WHERE id = $1;
3939

40-
-- name: ConfirmBatch :exec
41-
UPDATE
42-
sweep_batches
43-
SET
44-
confirmed = TRUE
45-
WHERE
46-
id = $1;
47-
4840
-- name: UpsertSweep :exec
4941
INSERT INTO sweeps (
5042
swap_hash,

sweepbatcher/store.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ import (
1616
// Querier is the interface that contains all the queries generated
1717
// by sqlc for sweep batcher.
1818
type Querier interface {
19-
// ConfirmBatch confirms a batch by setting the state to confirmed.
20-
ConfirmBatch(ctx context.Context, id int32) error
21-
2219
// GetBatchSweeps fetches all the sweeps that are part a batch.
2320
GetBatchSweeps(ctx context.Context, batchID int32) (
2421
[]sqlc.Sweep, error)
@@ -124,11 +121,6 @@ func (s *SQLStore) UpdateSweepBatch(ctx context.Context, batch *dbBatch) error {
124121
return s.baseDb.UpdateBatch(ctx, batchToUpdateArgs(*batch))
125122
}
126123

127-
// ConfirmBatch confirms a batch by setting the state to confirmed.
128-
func (s *SQLStore) ConfirmBatch(ctx context.Context, id int32) error {
129-
return s.baseDb.ConfirmBatch(ctx, id)
130-
}
131-
132124
// FetchBatchSweeps fetches all the sweeps that are part a batch.
133125
func (s *SQLStore) FetchBatchSweeps(ctx context.Context, id int32) (
134126
[]*dbSweep, error) {

sweepbatcher/store_mock.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,6 @@ func (s *StoreMock) UpdateSweepBatch(ctx context.Context,
7777
return nil
7878
}
7979

80-
// ConfirmBatch confirms a batch.
81-
func (s *StoreMock) ConfirmBatch(ctx context.Context, id int32) error {
82-
s.mu.Lock()
83-
defer s.mu.Unlock()
84-
85-
batch, ok := s.batches[id]
86-
if !ok {
87-
return errors.New("batch not found")
88-
}
89-
90-
batch.Confirmed = true
91-
s.batches[batch.ID] = batch
92-
93-
return nil
94-
}
95-
9680
// FetchBatchSweeps fetches all the sweeps that belong to a batch.
9781
func (s *StoreMock) FetchBatchSweeps(ctx context.Context,
9882
id int32) ([]*dbSweep, error) {

sweepbatcher/sweep_batcher.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ type BatcherStore interface {
6060
// UpdateSweepBatch updates a batch in the database.
6161
UpdateSweepBatch(ctx context.Context, batch *dbBatch) error
6262

63-
// ConfirmBatch confirms a batch by setting its state to confirmed.
64-
ConfirmBatch(ctx context.Context, id int32) error
65-
6663
// FetchBatchSweeps fetches all the sweeps that belong to a batch.
6764
FetchBatchSweeps(ctx context.Context, id int32) ([]*dbSweep, error)
6865

0 commit comments

Comments
 (0)