loop/sweepbatcher
Boris Nagaev 4c26aefe80
sweepbatcher: fix height hint for confirmations
Previously, we passed the current best block height as the height hint to
RegisterConfirmationsNtfn. If Loop was shut down when a sweep was confirmed
and restarted later, it would use the current best height as the hint. This
caused the confirmation to be missed, since it had already occurred before
that height.

This commit fixes the issue by passing the initiation height of the swap as the
height hint instead. This is consistent with what we do in other places where
we use RegisterConfirmationsNtfn.

Since LND caches previously passed height hints for RegisterConfirmationsNtfn
and uses maximum passed value, to actually recover in such a condition, one has
to restart LND passing the option --height-hint-cache-query-disable and then
restart Loop applying this fix. If a pruned bitcoind backend is used, this might
not work.
2025-04-05 18:01:16 -03:00
..
greedy_batch_selection.go sweepbatcher: allow adding groups of inputs 2025-04-03 09:49:46 -03:00
greedy_batch_selection_test.go sweepbatcher: allow adding groups of inputs 2025-04-03 09:49:46 -03:00
log.go multi: update lnd compile-time dependency to v0.19.0 2025-03-10 22:59:49 +01:00
store.go sweepbatcher: allow swap_hash to be non-unique 2025-04-01 11:11:44 -03:00
store_mock.go sweepbatcher: allow swap_hash to be non-unique 2025-04-01 11:11:44 -03:00
sweep_batch.go sweepbatcher: fix height hint for confirmations 2025-04-05 18:01:16 -03:00
sweep_batcher.go sweepbatcher: allow adding groups of inputs 2025-04-03 09:49:46 -03:00
sweep_batcher_test.go sweepbatcher: fix height hint for confirmations 2025-04-05 18:01:16 -03:00