Skip to content

Commit 239e288

Browse files
committedJun 12, 2025
loopdb: remove unused method ConfirmBatch
1 parent e2fb134 commit 239e288

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
@@ -35,14 +35,6 @@ UPDATE sweep_batches SET
3535
last_rbf_sat_per_kw = $6
3636
WHERE id = $1;
3737

38-
-- name: ConfirmBatch :exec
39-
UPDATE
40-
sweep_batches
41-
SET
42-
confirmed = TRUE
43-
WHERE
44-
id = $1;
45-
4638
-- name: UpsertSweep :exec
4739
INSERT INTO sweeps (
4840
swap_hash,

‎sweepbatcher/store.go

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

139-
// ConfirmBatch confirms a batch by setting the state to confirmed.
140-
func (s *SQLStore) ConfirmBatch(ctx context.Context, id int32) error {
141-
return s.baseDb.ConfirmBatch(ctx, id)
142-
}
143-
144136
// FetchBatchSweeps fetches all the sweeps that are part a batch.
145137
func (s *SQLStore) FetchBatchSweeps(ctx context.Context, id int32) (
146138
[]*dbSweep, error) {

‎sweepbatcher/store_mock.go

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

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

‎sweepbatcher/sweep_batcher.go

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

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

0 commit comments

Comments
 (0)