From 4e079d1d20f38d33c9dcc3aef77b80f85f3751ea Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 24 Nov 2020 20:31:11 -0800 Subject: [PATCH] lntest/itest: fix SendToRoute in UpdateChanPolicy test It needs to include the MPP payload now. --- lntest/itest/lnd_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lntest/itest/lnd_test.go b/lntest/itest/lnd_test.go index 84277a06..41ca93e6 100644 --- a/lntest/itest/lnd_test.go +++ b/lntest/itest/lnd_test.go @@ -2200,9 +2200,19 @@ func testUpdateChannelPolicy(net *lntest.NetworkHarness, t *harnessTest) { routes.Routes[0].Hops[1].AmtToForward = amtSat routes.Routes[0].Hops[1].AmtToForwardMsat = amtMSat + // Manually set the MPP payload a new for each payment since + // the payment addr will change with each invoice, although we + // can re-use the route itself. + route := routes.Routes[0] + route.Hops[len(route.Hops)-1].TlvPayload = true + route.Hops[len(route.Hops)-1].MppRecord = &lnrpc.MPPRecord{ + PaymentAddr: resp.PaymentAddr, + TotalAmtMsat: amtMSat, + } + sendReq = &lnrpc.SendToRouteRequest{ PaymentHash: resp.RHash, - Route: routes.Routes[0], + Route: route, } err = alicePayStream.Send(sendReq)