loop/loopdb/sqlc/migrations
Slyghtning 9fb4a5d606
staticaddr/loopin: persist risk decisions
Store the server's static loop-in confirmation-risk decision and the time it
was received. This lets recovered swaps reconstruct whether payment waiting had
already started and how much of the payment timeout remains.

Wire notification handling to persist accepted and rejected decisions before
caching and forwarding them. If the swap row is not present yet, the
notification is still cached so the per-swap waiter can replay and store the
decision later.

Recover accepted decisions by starting the payment deadline from the persisted
decision time, and recover rejected decisions by canceling the invoice and
failing the swap instead of waiting forever.
2026-05-22 11:22:44 +02:00
..
000001_swap.down.sql loopdb: add loopdb sqlite migrations 2023-06-20 17:31:39 +02:00
000001_swap.up.sql loopdb: add loopdb sqlite migrations 2023-06-20 17:31:39 +02:00
000002_liquidity_params.down.sql loopdb: add loopdb sqlite migrations 2023-06-20 17:31:39 +02:00
000002_liquidity_params.up.sql loopdb: add loopdb sqlite migrations 2023-06-20 17:31:39 +02:00
000003_reservations.down.sql loopdb: add reservation sqlc code 2024-01-17 15:59:05 +01:00
000003_reservations.up.sql loopdb: add reservation sqlc code 2024-01-17 15:59:05 +01:00
000004_is_wallet_addr.down.sql loopdb+sweepbatcher: add sweepbatcher store 2024-01-23 20:38:06 +02:00
000004_is_wallet_addr.up.sql loopdb+sweepbatcher: add sweepbatcher store 2024-01-23 20:38:06 +02:00
000005_sweep_batcher.down.sql loopdb+sweepbatcher: add sweepbatcher store 2024-01-23 20:38:06 +02:00
000005_sweep_batcher.up.sql loopdb+sweepbatcher: add sweepbatcher store 2024-01-23 20:38:06 +02:00
000006_instantout.down.sql instantout: add instantout store 2024-02-06 15:07:57 +01:00
000006_instantout.up.sql instantout: add instantout store 2024-02-06 15:07:57 +01:00
000007_payment_timeout.down.sql loopdb: add migraton and DB code to handle payment timeout 2024-05-23 17:17:21 +02:00
000007_payment_timeout.up.sql loopdb: add migraton and DB code to handle payment timeout 2024-05-23 17:17:21 +02:00
000008_migration_tracker.down.sql loopdb: add ability to track manual migrations 2024-06-03 14:54:18 +02:00
000008_migration_tracker.up.sql loopdb: add ability to track manual migrations 2024-06-03 14:54:18 +02:00
000009_static_address.down.sql sqlc: static address migrations, models, queries 2024-12-12 18:31:00 +01:00
000009_static_address.up.sql staticaddr: add initiation height of address 2024-12-12 18:31:10 +01:00
000010_static_address_deposits.down.sql sqlc: deposit queries, models and migrations 2024-12-12 18:31:03 +01:00
000010_static_address_deposits.up.sql staticaddr: track unconfirmed deposits 2026-05-22 11:22:41 +02:00
000011_static_address_loop_in.down.sql sqlc: loop-in tables and queries 2024-12-12 18:31:06 +01:00
000011_static_address_loop_in.up.sql sqlc: loop-in tables and queries 2024-12-12 18:31:06 +01:00
000012_loop_out_asset_params.down.sql loopdb: add asset params to store 2025-01-21 18:26:20 +01:00
000012_loop_out_asset_params.up.sql loopdb: add asset params to store 2025-01-21 18:26:20 +01:00
000013_batcher_key_outpoint.down.sql sweepbatcher: allow swap_hash to be non-unique 2025-04-01 11:11:44 -03:00
000013_batcher_key_outpoint.up.sql loopdb: fix migration 13 for Postgres 2025-04-04 16:31:57 -03:00
000014_reservation_protocol_version.down.sql reservation: add protocol version 2025-04-30 14:23:47 +02:00
000014_reservation_protocol_version.up.sql reservation: add protocol version 2025-04-30 14:23:47 +02:00
000015_static_address_withdrawals.down.sql loopdb: withdrawal table and queries 2025-06-03 12:57:10 +02:00
000015_static_address_withdrawals.up.sql loopdb: withdrawal table and queries 2025-06-03 12:57:10 +02:00
000016_batch_cancelled.down.sql sweepbatcher: add an option to ignore HTLC txids 2025-06-17 14:47:49 -03:00
000016_batch_cancelled.up.sql sweepbatcher: add an option to ignore HTLC txids 2025-06-17 14:47:49 -03:00
000017_deposit_swaphash.down.sql staticaddr: migrate swap hashes to deposits 2025-08-01 11:26:32 +02:00
000017_deposit_swaphash.up.sql staticaddr: migrate swap hashes to deposits 2025-08-01 11:26:32 +02:00
000018_deposit_updates_index.down.sql loopdb: add deposit indices 2025-08-12 16:36:48 +02:00
000018_deposit_updates_index.up.sql loopdb: add deposit indices 2025-08-12 16:36:48 +02:00
000019_static_selected_amount.down.sql sqlc: add amount column to static swaps 2025-09-25 11:13:33 +02:00
000019_static_selected_amount.up.sql sqlc: add amount column to static swaps 2025-09-25 11:13:33 +02:00
000020_static_address_fast_flag.down.sql loopdb: staticaddr fast flag migration and queries 2025-10-07 08:53:36 +02:00
000020_static_address_fast_flag.up.sql loopdb: staticaddr fast flag migration and queries 2025-10-07 08:53:36 +02:00
000021_static_loopin_risk_decision.down.sql staticaddr/loopin: persist risk decisions 2026-05-22 11:22:44 +02:00
000021_static_loopin_risk_decision.up.sql staticaddr/loopin: persist risk decisions 2026-05-22 11:22:44 +02:00