lntest/itest: fix SendToRoute in UpdateChanPolicy test
It needs to include the MPP payload now.
This commit is contained in:
parent
7fdf46ea4e
commit
4e079d1d20
@ -2200,9 +2200,19 @@ func testUpdateChannelPolicy(net *lntest.NetworkHarness, t *harnessTest) {
|
|||||||
routes.Routes[0].Hops[1].AmtToForward = amtSat
|
routes.Routes[0].Hops[1].AmtToForward = amtSat
|
||||||
routes.Routes[0].Hops[1].AmtToForwardMsat = amtMSat
|
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{
|
sendReq = &lnrpc.SendToRouteRequest{
|
||||||
PaymentHash: resp.RHash,
|
PaymentHash: resp.RHash,
|
||||||
Route: routes.Routes[0],
|
Route: route,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = alicePayStream.Send(sendReq)
|
err = alicePayStream.Send(sendReq)
|
||||||
|
Loading…
Reference in New Issue
Block a user