routerrpc: unmarshal AMP record in route hop marshalling

This commit is contained in:
Alex Sears committed 2024-01-26 15:21:43 -05:00
1 parent 4521894ed2
commit 0767a2cbc0
2 files changed
+23

No files matched your search

+10
View File
@@ -410,6 +410,16 @@ func testSendPaymentAMP(ht *lntest.HarnessTest) {
if htlc.Status == lnrpc.HTLCAttempt_SUCCEEDED {
succeeded++
}
// When an AMP record is expected, it will only be seen on the
// last hop of a route. So we make sure it isn't set on any of
// the hops except the last one
for _, hop := range htlc.Route.Hops[:len(htlc.Route.Hops)-1] {
require.Nil(ht, hop.AmpRecord)
}
lastHop := htlc.Route.Hops[len(htlc.Route.Hops)-1]
require.NotNil(ht, lastHop.AmpRecord)
}
const minExpectedShards = 3