multi: send channel update for failed interceptor packets

This commit is contained in:
carla
2021-04-22 19:39:37 +02:00
parent eda3d45b3d
commit 5b7b6ab9b0
2 changed files with 19 additions and 1 deletions

View File

@@ -128,6 +128,15 @@ func testForwardInterceptor(net *lntest.NetworkHarness, t *harnessTest) {
require.Equal(t.t, lnrpc.HTLCAttempt_FAILED,
attempt.Status, "expected payment to fail")
// Assert that we get a temporary channel
// failure which has a channel update.
require.NotNil(t.t, attempt.Failure)
require.NotNil(t.t, attempt.Failure.ChannelUpdate)
require.Equal(t.t,
lnrpc.Failure_TEMPORARY_CHANNEL_FAILURE,
attempt.Failure.Code)
// For settle and resume we make sure the payment is successful.
case routerrpc.ResolveHoldForwardAction_SETTLE:
fallthrough