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
@@ -194,6 +194,7 @@ func initSwitchWithDB(startingHeight uint32, db *channeldb.DB) (*Switch, error)
cfg := Config{
DB: db,
FetchAllOpenChannels: db.ChannelStateDB().FetchAllOpenChannels,
FetchAllChannels: db.ChannelStateDB().FetchAllChannels,
FetchClosedChannels: db.ChannelStateDB().FetchClosedChannels,
SwitchPackager: channeldb.NewSwitchPackager(),
FwdingLog: &mockForwardingLog{