mirror of
https://github.com/lightninglabs/loop
synced 2024-11-08 01:10:29 +00:00
sweepbatcher: use write tx in DropBatch
This commit is contained in:
parent
3fd3fab8d1
commit
b311649ce4
@ -111,7 +111,7 @@ func (s *SQLStore) InsertSweepBatch(ctx context.Context, batch *dbBatch) (int32,
|
||||
// DropBatch drops a batch from the database. Note that we only use this call
|
||||
// for batches that have no sweeps and so we'd not be able to resume.
|
||||
func (s *SQLStore) DropBatch(ctx context.Context, id int32) error {
|
||||
readOpts := loopdb.NewSqlReadOpts()
|
||||
readOpts := loopdb.NewSqlWriteOpts()
|
||||
return s.baseDb.ExecTx(ctx, readOpts, func(tx *sqlc.Queries) error {
|
||||
dbSweeps, err := tx.GetBatchSweeps(ctx, id)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user