Skip to content

routing: remove newRoute#6920

Draft
joostjager wants to merge 3 commits intolightningnetwork:masterfrom
bottlepay:remove-newroute
Draft

routing: remove newRoute#6920
joostjager wants to merge 3 commits intolightningnetwork:masterfrom
bottlepay:remove-newroute

Conversation

@joostjager
Copy link
Contributor

@joostjager joostjager commented Sep 15, 2022

This PR is an alternative to #6912. It removes newRoute completely and forces pathfinding and route building to construct its own routes.

The advantage of this more direct approach is that there is no chance that newRoute yields a different route than what pathfinding worked with. Potential bugs are exposed and not "smoothed over" by newRoute. Also some of the steps to get to the final route don't need to be executed twice.

The change to BuildRoute also fixes edge cases with min_htlc where a valid route wasn't expressible through newRoute's input parameters.

// Allocate a list that will contain the unified policies for this
// route.
edges := make([]*unifiedPolicy, len(hops))
var (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of removing newRoute from BuildRoute, we can also skip that and re-route BuildRoute to pathfinding: #6921

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant