mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
Before we send HTLC signatures to the server, the server cannot publish the HTLC transaction. After those signatures are handed over, the server can publish an HTLC that spends the selected deposits even if it never pays the swap invoice. Defend against stale local deposit state by checking the wallet's current txout view immediately before signing. A deposit can have been spent by a known withdrawal, channel open, timeout sweep, replacement, or another wallet transaction while the loop-in FSM is recovering or while earlier state still marked it as selected. Failing before signing leaves the server without spend authority over an unavailable input. Include mempool spends in the check so wallet-known unconfirmed spends are treated as unavailable too. |
||
|---|---|---|
| .. | ||
| actions.go | ||
| actions_test.go | ||
| autoloop.go | ||
| autoloop_dp.go | ||
| autoloop_dp_test.go | ||
| autoloop_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 | ||
| txout_checker.go | ||
| txout_checker_test.go | ||