loop/loopdb
Slyghtning 325545143c
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-06-01 10:46:52 +02:00
..
sqlc staticaddr/loopin: persist risk decisions 2026-06-01 10:46:52 +02:00
codec.go loopdb: add the local pubkey's keylocator to the persisted contract 2022-06-30 16:59:57 +02:00
codec_test.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
interface.go loopdb: add asset params to store 2025-01-21 18:26:20 +01:00
log.go multi: update lnd compile-time dependency to v0.19.0 2025-03-10 22:59:49 +01:00
loop.go loopdb: refactor the SwapContract to hold all HTLC keys 2023-03-20 20:08:43 +01:00
loopin.go godoc: address copy-paste errors accross the codebase 2026-03-09 14:39:44 +01:00
loopout.go loopout: add asset loop out payment flow 2025-01-21 18:26:19 +01:00
meta.go godoc: address copy-paste errors accross the codebase 2026-03-09 14:39:44 +01:00
migrate.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
migrate_test.go loopdb: add migrator 2023-06-20 18:59:31 +02:00
migration_01_costs.go loopdb: switch to go.etcd.io/bbolt 2025-03-19 15:00:30 +01:00
migration_02_swap_publication_deadline.go loopdb: switch to go.etcd.io/bbolt 2025-03-19 15:00:30 +01:00
migration_03_last_hop.go loopdb: switch to go.etcd.io/bbolt 2025-03-19 15:00:30 +01:00
migration_04_updates.go loopdb: switch to go.etcd.io/bbolt 2025-03-19 15:00:30 +01:00
migration_04_updates_test.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
migrations.go multi: update linter, fix issues 2023-10-03 19:36:40 +02:00
postgres.go loopdb: clean up comments 2026-05-27 11:50:30 +02:00
postgres_fixture.go loopdb: add postgres store 2023-06-20 18:59:30 +02:00
protocol_version.go loopdb: clean up comments 2026-05-27 11:50:30 +02:00
protocol_version_test.go linter: fix lint issues after linter v2 update 2025-08-19 21:57:00 +02:00
raw_db_test.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
schemas.go loopdb: create base sqlite store 2023-06-20 17:31:40 +02:00
sql_store.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
sql_test.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
sqlerrors.go chore: fix some function names 2024-08-12 22:59:32 +08:00
sqlite.go linter: fix lint issues after linter v2 update 2025-08-19 21:57:00 +02:00
store.go godoc: address copy-paste errors accross the codebase 2026-03-09 14:39:44 +01:00
store_mock.go godoc: address copy-paste errors accross the codebase 2026-03-09 14:39:44 +01:00
store_test.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
swapstate.go godoc: address copy-paste errors accross the codebase 2026-03-09 14:39:44 +01:00
test_postgres.go loopdb: fix faulty timestamps on startup 2023-08-07 21:04:30 +02:00
test_sqlite.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
typed_store.go multi: typed callback in ExecTx 2024-06-19 10:38:55 -03:00