staticaddr/loopin: persist risk decisions

Store server confirmation-risk decisions with static loop-in swaps and
recover accepted payment-deadline timers after restart. Wire
notification persistence through loopd so recovered swaps do not lose
pending risk state.

Deduplicate notification fanout cache entries by swap hash.
This commit is contained in:
Slyghtning 2026-06-26 12:54:30 +02:00
parent d045d5ecd2
commit fc3fba7c23
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF
17 changed files with 1713 additions and 286 deletions

View file

@ -33,6 +33,14 @@ SET
WHERE
swap_hash = $1;
-- name: RecordStaticAddressRiskDecision :exec
UPDATE static_address_swaps
SET
confirmation_risk_decision = $2,
confirmation_risk_decision_time = $3
WHERE
swap_hash = $1;
-- name: InsertStaticAddressMetaUpdate :exec
INSERT INTO static_address_swap_updates (
swap_hash,
@ -150,4 +158,3 @@ WHERE