routing: use first hop records on path finding

This commit is contained in:
George Tsagkarelis
2024-05-02 18:48:28 +02:00
committed by Oliver Gugger
parent 4804cbf139
commit aa17543d23
4 changed files with 128 additions and 15 deletions

View File

@@ -1188,6 +1188,13 @@ func (r *ChannelRouter) sendToRoute(htlcHash lntypes.Hash, rt *route.Route,
firstHopCustomRecords,
)
// Allow the traffic shaper to add custom records to the outgoing HTLC
// and also adjust the amount if needed.
err = p.amendFirstHopData(rt)
if err != nil {
return nil, err
}
// We found a route to try, create a new HTLC attempt to try.
//
// NOTE: we use zero `remainingAmt` here to simulate the same effect of