mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-15 12:50:28 +02:00
sweepbatcher: add an option to ignore HTLC txids
Added option WithSkippedTxns, which has one historical problematic tx by default. Sweeps originating from these transactions are omitted when reading from DB. loopdb: add column sweep_batches.cancelled and replaced DropBatch with CancelBatch. It is needed, because sweep.batch_id is a foreign key to batch. Changed StoreMock.InsertSweepBatch not to reuse batch_id. This is needed by the test, which checks that new batch has fresh ID.
This commit is contained in:
parent
1ab73a6272
commit
1036214160
16 changed files with 349 additions and 58 deletions
|
|
@ -4,7 +4,7 @@ SELECT
|
|||
FROM
|
||||
sweep_batches
|
||||
WHERE
|
||||
confirmed = FALSE;
|
||||
confirmed = FALSE AND cancelled = FALSE;
|
||||
|
||||
-- name: InsertBatch :one
|
||||
INSERT INTO sweep_batches (
|
||||
|
|
@ -23,8 +23,10 @@ INSERT INTO sweep_batches (
|
|||
$6
|
||||
) RETURNING id;
|
||||
|
||||
-- name: DropBatch :exec
|
||||
DELETE FROM sweep_batches WHERE id = $1;
|
||||
-- name: CancelBatch :exec
|
||||
UPDATE sweep_batches SET
|
||||
cancelled = TRUE
|
||||
WHERE id = $1;
|
||||
|
||||
-- name: UpdateBatch :exec
|
||||
UPDATE sweep_batches SET
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue