Commit graph

23 commits

Author SHA1 Message Date
Slyghtning
b2f37bfa78
staticaddr/loopin: use generated change addresses
Create a fresh static change address for fractional loop-ins and persist
its key locator with the selected HTLC outpoint. Recovery reconstructs
the same change output instead of returning funds to the legacy root
address.
2026-08-10 14:18:05 +02:00
Slyghtning
991830336f
loopdb: persist deposit address ownership
Associate every deposit with the static address parameters that created
it. This lets restored deposits recover the correct script and signing
keys instead of assuming the legacy root address.
2026-08-10 14:18:04 +02:00
Slyghtning
491fddbc34
loopdb: persist static loop-in risk decisions
Add schema, sqlc queries, store fields, and SqlStore support for
recording server confirmation-risk decisions with static loop-in swaps.
Store the decision timestamp so payment-deadline recovery can
reconstruct elapsed time after restart.
2026-07-12 09:14:33 +02:00
Slyghtning
92a8726e07
loopdb: staticaddr fast flag migration and queries 2025-10-07 08:53:36 +02:00
Slyghtning
22ac716726
sqlc: add amount column to static swaps 2025-09-25 11:13:33 +02:00
Slyghtning
6e7441ba8d
staticaddr: migrate swap hashes to deposits 2025-08-01 11:26:32 +02:00
Boris Nagaev
1036214160
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.
2025-06-17 14:47:49 -03:00
Slyghtning
94aeae81ed
loopdb: withdrawal table and queries 2025-06-03 12:57:10 +02:00
sputn1ck
56848d0cfa
reservation: add protocol version 2025-04-30 14:23:47 +02:00
Boris Nagaev
c80ebb96e9
sweepbatcher: allow swap_hash to be non-unique
SwapHash used to be a key in the sweeps table. Now the key is outpoint which
replaces columns outpoint_txid and outpoint_index. In-memory structures and unit
tests were also updated to use outpoint as key. Outpoint is truly unique.
2025-04-01 11:11:44 -03:00
sputn1ck
40614a2a7a
loopdb: add asset params to store 2025-01-21 18:26:20 +01:00
Slyghtning
fc6c9f224c
staticaddr: add initiation height of address 2024-12-12 18:31:10 +01:00
Slyghtning
494d0915b0
sqlc: loop-in tables and queries
We add CRU procedures for static address swaps.
2024-12-12 18:31:06 +01:00
Slyghtning
55f7625bc5
sqlc: withdrawal address for deposits
Deposit schema extension with a withdrawal
sweep address. If the user selects a deposit
for withdrawal the destination address of the
sweep is stored here.
2024-12-12 18:31:04 +01:00
Slyghtning
5f4fca8219
sqlc: deposit queries, models and migrations 2024-12-12 18:31:03 +01:00
Slyghtning
2c07434a72
sqlc: static address migrations, models, queries 2024-12-12 18:31:00 +01:00
Andras Banki-Horvath
c650cdc8a8
loopdb: add ability to track manual migrations 2024-06-03 14:54:18 +02:00
Andras Banki-Horvath
4749c029bb
loopdb: add migraton and DB code to handle payment timeout 2024-05-23 17:17:21 +02:00
Andras Banki-Horvath
fb0c7f504e
loopdb: bump sqlc to 1.25.0 2024-03-20 13:57:11 +01:00
sputn1ck
ee0309f942
instantout: add instantout store 2024-02-06 15:07:57 +01:00
George Tsagkarelis
99608ad515
loopdb+sweepbatcher: add sweepbatcher store 2024-01-23 20:38:06 +02:00
sputn1ck
a29f7e4a6b
loopdb: add reservation sqlc code 2024-01-17 15:59:05 +01:00
sputn1ck
206e463db7
loopdb: generate sqlc files 2023-06-20 17:31:40 +02:00