Commit dcea175
committed
Persistent monitor events for off-chain outbound fails
We are in the process of moving the resolution of off-chain HTLCs from the
Channel to the ChannelMonitor, via MonitorEvents. This will simplify how we
reconstruct/reconcile the ChannelManager's pending HTLC set on startup and
avoid needing to persist pending HTLCs explicitly in the manager, as we can
just replay pending monitor events to reconstruct the set instead.
In a recent commit, we started generating persistent monitor events whenever an
htlc is failed off-chain, but those events were no-ops at the time.
In this commit, we make those monitor events the sole driver of off-chain
outbound payment failure. When `persistent_monitor_events` is enabled, we will
skip the existing failure path for these HTLCs and instead fail them when the
monitor event is processed. Similar to what we do for claims, the monitor event
will not be acked and will continue to be re-provided on startup until the
resulting PaymentFailed event is processed by the user.
Forward and on-chain failure paths are unchanged and will be migrated
separately as part of the broader refactor.1 parent 1688a64 commit dcea175
1 file changed
Lines changed: 30 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10547 | 10547 | | |
10548 | 10548 | | |
10549 | 10549 | | |
| 10550 | + | |
| 10551 | + | |
| 10552 | + | |
| 10553 | + | |
| 10554 | + | |
| 10555 | + | |
| 10556 | + | |
10550 | 10557 | | |
10551 | 10558 | | |
10552 | 10559 | | |
| |||
13971 | 13978 | | |
13972 | 13979 | | |
13973 | 13980 | | |
13974 | | - | |
| 13981 | + | |
| 13982 | + | |
| 13983 | + | |
13975 | 13984 | | |
13976 | 13985 | | |
13977 | 13986 | | |
13978 | 13987 | | |
13979 | | - | |
13980 | | - | |
13981 | | - | |
13982 | | - | |
13983 | | - | |
13984 | | - | |
| 13988 | + | |
| 13989 | + | |
| 13990 | + | |
| 13991 | + | |
| 13992 | + | |
| 13993 | + | |
| 13994 | + | |
| 13995 | + | |
| 13996 | + | |
| 13997 | + | |
| 13998 | + | |
| 13999 | + | |
| 14000 | + | |
| 14001 | + | |
| 14002 | + | |
| 14003 | + | |
13985 | 14004 | | |
13986 | 14005 | | |
13987 | 14006 | | |
13988 | 14007 | | |
13989 | 14008 | | |
13990 | | - | |
| 14009 | + | |
13991 | 14010 | | |
13992 | 14011 | | |
13993 | | - | |
| 14012 | + | |
| 14013 | + | |
| 14014 | + | |
13994 | 14015 | | |
13995 | 14016 | | |
13996 | 14017 | | |
| |||
0 commit comments