]> git.bitcoin.ninja Git - rust-lightning/commit
Filter route hints for create invoice
authorViktor Tigerström <11711198+ViktorTigerstrom@users.noreply.github.com>
Mon, 21 Feb 2022 01:31:21 +0000 (02:31 +0100)
committerViktor Tigerström <11711198+ViktorTigerstrom@users.noreply.github.com>
Wed, 16 Mar 2022 10:24:12 +0000 (11:24 +0100)
commitfe49fbd7b816ea4942099bbd25615ba2cfb8f381
tree5038ce6b8ceffc92863adf9c31b0ba5fbad6ab1b
parentca163c3fae94e64b7f70a7a549cd761cfa7e52d2
Filter route hints for create invoice

Filter the route hints in `create_invoice_from_channelmanager` based on
the following criteria:

* Only one channel per counterparty node
* Always select the channel with the highest inbound capacity
* Filter out channels with a lower inbound capacity than the invoice
amount, if any channel exists with enough capacity to cover the invoice
amount
* If any public channel exists, the invoice route_hints should be empty,
and the sender will need to find the path to the payment-receiving node
by looking at the public channels instead
lightning-invoice/src/utils.rs