routing/route: define route.ReceiverAmt() method

This commit is contained in:
Johan T. Halseth
2020-04-01 00:13:23 +02:00
parent 4485e8261f
commit 79227bab3a
3 changed files with 31 additions and 5 deletions

View File

@@ -1746,7 +1746,7 @@ func (r *ChannelRouter) SendToRoute(hash lntypes.Hash, route *route.Route) (
paySession := r.cfg.SessionSource.NewPaymentSessionForRoute(route)
// Calculate amount paid to receiver.
amt := route.TotalAmount - route.TotalFees()
amt := route.ReceiverAmt()
// Record this payment hash with the ControlTower, ensuring it is not
// already in-flight.