Skip to content

Take into account max onion blob size when pathfinding #3725

@joostjager

Description

@joostjager

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions