mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
Replace the recursive full-deposit autoloop selector with a bounded-memory DP implementation in staticaddr/loopin/autoloop_dp.go. The new selector keeps the existing no-change semantics, first finds the best reachable total, then applies the 25 percent band rule so earlier-expiring deposits can win inside that near-optimal range. The DP table is capped at 128 MiB and keeps exact satoshi sums alongside compressed bucket weights, so planning stays memory-bounded without allowing oversized candidates. The compressed weighting now rounds down with a minimum of one bucket, which avoids rejecting valid sums after multiple per-deposit rounding steps while leaving the exact-sum check as the real safety boundary. |
||
|---|---|---|
| .. | ||
| 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 | ||