mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-21 14:10:35 +02:00
Merge pull request #7976 from w3irdrobot/serialize-deserialize-amp
Serialize/deserialize AMP struct in hop
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user