loop/staticaddr
Slyghtning 63d8f5560e
loopin: enforce HTLC output index invariant in sweep tx construction
createHtlcTx always places the HTLC output at index 0 and the change
output (if any) at index 1. Previously, createHtlcSweepTx attempted to
dynamically find the HTLC index but then unconditionally read
TxOut[0].Value, ignoring the computed index.

Replace the dynamic search with a const htlcInputIndex=0 and a fail-fast
check that errors if the layout invariant is ever violated. Add a test
that verifies the sweep value is derived from the HTLC output, not the
change output.
2026-03-09 08:37:48 +01:00
..
address staticutil: refactor methods into utils 2025-12-09 12:21:51 +01:00
deposit deposit: add OnExpiry self-transitions to OpeningChannel and ChannelPublished 2026-02-26 20:57:27 +01:00
loopin loopin: enforce HTLC output index invariant in sweep tx construction 2026-03-09 08:37:48 +01:00
openchannel openchannel: optimize open channel request creation and err handling 2026-02-26 20:57:28 +01:00
script multi: update linter, fix issues 2025-03-10 22:59:50 +01:00
staticutil staticaddr: open channel manager 2026-02-26 20:57:26 +01:00
version multi: do not rename swapserverrpc to looprpc 2024-09-10 09:54:17 -03:00
withdraw staticaddr: open channel manager 2026-02-26 20:57:26 +01:00
log.go staticaddr: open channel manager 2026-02-26 20:57:26 +01:00