lntest/itest: fix SendToRoute in UpdateChanPolicy test

It needs to include the MPP payload  now.
This commit is contained in:
Olaoluwa Osuntokun 2020-11-24 20:31:11 -08:00
parent 7fdf46ea4e
commit 4e079d1d20
No known key found for this signature in database
GPG Key ID: 3BBD59E99B280306

@ -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)