routing: distinguish between receiver amount and total amount in newRoute

This commit is contained in:
Joost Jager committed 2020-04-09 08:20:47 +02:00
1 parent e5c7e9a38c
commit 46f5fc7400
4 files changed
+7 -1

No files matched your search

+3 -1
View File
@@ -74,6 +74,7 @@ type edgePolicyWithSource struct {
// custom records and payment address.
type finalHopParams struct {
amt lnwire.MilliSatoshi
totalAmt lnwire.MilliSatoshi
cltvDelta uint16
records record.CustomSet
paymentAddr *[32]byte
@@ -177,7 +178,8 @@ func newRoute(sourceVertex route.Vertex,
// Otherwise attach the mpp record if it exists.
if finalHop.paymentAddr != nil {
mpp = record.NewMPP(
finalHop.amt, *finalHop.paymentAddr,
finalHop.totalAmt,
*finalHop.paymentAddr,
)
}
} else {