rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Setting `max_path_count` to `channel_manager.list_usable_channels().len()` fails to route full amount

Open MaxFangX opened this issue 9 months ago • 0 comments

For convenience, here's the scenario in #3685 which is fixed by #3707:

  • Alice -> Bob 200k and 300k sat channels
  • Bob -> Charlie 600k sat private channel
  • Send a MPP payment Alice -> Charlie of size 350k sats

If we amend this scenario so that:

  • Alice limits max_path_count to channel_manager.list_usable_channels().len() (i.e. 2)
  • Alice tries to send 450k sats instead of 350k sats

Then the regression test added in #3707 fails.

Repro here: https://github.com/lexe-app/rust-lightning/tree/max/repro-max-path-count-limit

MaxFangX avatar Apr 10 '25 03:04 MaxFangX