]> git.bitcoin.ninja Git - rust-lightning/commit
[router] Make Dijkstra's path scoring non-decreasing + consistent
authorMatt Corallo <git@bluematt.me>
Sat, 27 Mar 2021 02:57:23 +0000 (22:57 -0400)
committerMatt Corallo <git@bluematt.me>
Sat, 27 Mar 2021 02:57:23 +0000 (22:57 -0400)
commitd4e7ca11fe82119a536f6fccfc36bc6620021c12
tree2cd8c1b45c3480fa382579512ae84571bc3eaf76
parent0c2dd406eca7fe9ec520c158fcd23abec79d6549
[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