Commit 4c26aef
committed
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.1 parent ec2bf44 commit 4c26aef
2 files changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1707 | 1707 | | |
1708 | 1708 | | |
1709 | 1709 | | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
1710 | 1716 | | |
1711 | 1717 | | |
1712 | 1718 | | |
1713 | 1719 | | |
1714 | 1720 | | |
1715 | 1721 | | |
1716 | | - | |
| 1722 | + | |
| 1723 | + | |
1717 | 1724 | | |
1718 | 1725 | | |
1719 | 1726 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
| 784 | + | |
| 785 | + | |
784 | 786 | | |
785 | 787 | | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
790 | 793 | | |
791 | 794 | | |
792 | 795 | | |
| |||
871 | 874 | | |
872 | 875 | | |
873 | 876 | | |
874 | | - | |
875 | 877 | | |
876 | 878 | | |
877 | 879 | | |
878 | 880 | | |
879 | 881 | | |
880 | 882 | | |
881 | | - | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
882 | 888 | | |
883 | 889 | | |
884 | 890 | | |
| |||
0 commit comments