htlcswitch+server: ensure we always send an update w/ a TempChannelFailure

In this commit, we ensure that any time we send a TempChannelFailure
that's destined for a multi-hop source sender, then we'll always package
the latest channel update along with it.
This commit is contained in:
Olaoluwa Osuntokun
2018-05-07 20:00:32 -07:00
committed by Wilmer Paulino
parent 27ca61aedf
commit 72f48b6abe
6 changed files with 101 additions and 40 deletions

View File

@@ -1459,8 +1459,7 @@ func newSingleLinkTestHarness(chanAmt, chanReserve btcutil.Amount) (
}
aliceDb := aliceChannel.State().Db
aliceSwitch, err := New(Config{DB: aliceDb})
aliceSwitch, err := initSwitchWithDB(aliceDb)
if err != nil {
return nil, nil, nil, nil, nil, err
}
@@ -3854,7 +3853,7 @@ func restartLink(aliceChannel *lnwallet.LightningChannel, aliceSwitch *Switch,
if aliceSwitch == nil {
var err error
aliceSwitch, err = New(Config{DB: aliceDb})
aliceSwitch, err = initSwitchWithDB(aliceDb)
if err != nil {
return nil, nil, nil, err
}