loopd: account for channel reserves in loop out validation

Use each channel's local balance minus its reserve when simulating Loop
Out payment bandwidth, clamping the result at zero. This prevents swaps
from starting when the gross balance covers the amount and routing fee
but the spendable balance does not.

Add one-sat boundary tests and a bug-fix release note. Leave a TODO for
server-fee and prepay capacity because enforcing their maximum fee caps
could reject viable swaps whose actual routing fees are lower.
This commit is contained in:
Boris Nagaev 2026-08-10 17:30:38 -05:00
parent 1b81a06b42
commit 95e184a40f
No known key found for this signature in database
3 changed files with 72 additions and 6 deletions

View file

@ -6,6 +6,10 @@
#### Bug Fixes
* Loop Out requests now account for channel reserves when checking outbound
capacity, preventing swaps from starting when their off-chain payment cannot
be funded.
* Taproot Asset Loop Out handling now validates RFQ timeouts and asset rates,
keeps cached asset-name lookups responsive during slow `tapd` queries, and
closes `tapd` connections cleanly during shutdown and startup failures.