[router] Make Dijkstra's path scoring non-decreasing + consistent
authorMatt Corallo <git@bluematt.me>
Sat, 27 Mar 2021 02:56:37 +0000 (22:56 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 7 Apr 2021 01:41:45 +0000 (21:41 -0400)
commited54379ee4bfdfd461d201f3020023cdd082d72e
treecf5828c41a535af2bce8e4bfb2fcd9cf9460e51b
parent16a6e9c5c8f694750e87c3f4ea0acb6d74ca8b44
[router] Make Dijkstra's path scoring non-decreasing + consistent

Currently, the "best source" for a given node tracked during
Dijkstra's is updated with a different critera from the heap
sorting, resulting in loops in calculated paths.

This adds a test for the specific failure currently seen, utilizing
the new path-htlc-minimum tracking in the heap entries in place of
the per-hop htlc-minimum values which the MPP changeset partially
used.
lightning/src/routing/router.rs