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. |
||
|---|---|---|
| .. | ||
| actions.go | ||
| actions_test.go | ||
| deduce_amount_test.go | ||
| deposit_swaphash_migration.go | ||
| deposit_swaphash_migration_test.go | ||
| fsm.go | ||
| interface.go | ||
| log.go | ||
| loopin.go | ||
| loopin_test.go | ||
| manager.go | ||
| manager_test.go | ||
| selected_amount_migration.go | ||
| selected_amount_migration_test.go | ||
| sql_store.go | ||
| sql_store_test.go | ||