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
2022-08-02 12:54:47 -04:00
parent 35c59643cd
commit bb956e127e
3 changed files with 10 additions and 2 deletions

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{