server+htlcswitch: check waiting-close fwdpkgs in reforwardResponses

Previously, the Switch would not check waiting-close channels' fwdpkgs
for settles or fails to reforward. This could result in a force close
in a rare edge case if a restart occurred at the wrong time. Now,
waiting-close fwdpkgs are checked and the issue is avoided.
This commit is contained in:
eugene committed 2022-09-30 14:40:38 -04:00
1 parent 35c59643cd
commit bb956e127e
3 files changed
+10 -2

No files matched your search

+1
View File
@@ -630,6 +630,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
s.htlcSwitch, err = htlcswitch.New(htlcswitch.Config{
DB: dbs.ChanStateDB,
FetchAllOpenChannels: s.chanStateDB.FetchAllOpenChannels,
FetchAllChannels: s.chanStateDB.FetchAllChannels,
FetchClosedChannels: s.chanStateDB.FetchClosedChannels,
LocalChannelClose: func(pubKey []byte,
request *htlcswitch.ChanClose) {