mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
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. |
||
|---|---|---|
| .. | ||
| address | ||
| deposit | ||
| loopin | ||
| openchannel | ||
| script | ||
| staticutil | ||
| version | ||
| withdraw | ||
| log.go | ||