Currently pathfinding for QueryRoutes and SendPayment assumes a fix hop limit of 20 hops. This is no longer true now that there is the variable-size tlv payload.
With a variable payload it is possible to have more than 20 hops. But the maximum number of hops could also be less, for example when a large custom field is delivered to one of the hops.
Pathfinding needs to take the onion payload size into account.
Possibly we also need the option to pass in an external 'reserve' size, to allow for applications that use the QueryRoutes result and append additional hops. This is typically done for rebalancing channels (send to self).
Currently pathfinding for
QueryRoutesandSendPaymentassumes a fix hop limit of 20 hops. This is no longer true now that there is the variable-size tlv payload.With a variable payload it is possible to have more than 20 hops. But the maximum number of hops could also be less, for example when a large custom field is delivered to one of the hops.
Pathfinding needs to take the onion payload size into account.
Possibly we also need the option to pass in an external 'reserve' size, to allow for applications that use the
QueryRoutesresult and append additional hops. This is typically done for rebalancing channels (send to self).