mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
c8c3294a23
We split json_invoice(), as it now needs to round-trip to the gossipd, and uniqueness checks need to happen *after* gossipd replies to avoid a race. For every candidate channel gossipd gives us, we check that it's in state NORMAL (not shutting down, not still waiting for lockin), that it's connected, and that it has capacity. We then choose one with probability weighted by excess capacity, so larger channels are more likely. As a side effect of this, we can tell if an invoice is unpayble (no channels have sufficient incoming capacity) or difficuly (no *online* channels have sufficient capacity), so we add those warnings. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> |
||
---|---|---|
.. | ||
Makefile | ||
run-commit_tx.c | ||
run-find_my_abspath.c | ||
run-funding_tx.c | ||
run-invoice-select-inchan.c | ||
run-key_derive.c | ||
run-param.c |