This just tries all prefixes of a route to the given node, returning a failure
as soon as it hits the channel that got the payment stuck.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Since `probe` may take a while, or hang altogether we better make it async so
we can run multiple ones in parallel. The next step is to have a sweeper
thread that just checks all pending probes.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
BOLT#7 requires that nodes "SHOULD accept HTLCs that pay a fee equal to or greater than:
fee_base_msat + ( amount_to_forward * fee_proportional_millionths / 1000000 )".
The code in rebalance.py:setup_routing_fees was not strictly meeting the above requirement, as it was using truncating integer division to calculate the proportional part of the fee, which typically results in a fee that is strictly less than the theoretical, infinite-precision, required fee. Some node implementations may allow rounding down here, but some do not, resulting in sporadic WIRE_FEE_INSUFFICIENT errors.
This commit changes the fee calculation in setup_routing_fees so that it always rounds up to the next whole millisatoshi, thereby eliminating many WIRE_FEE_INSUFFICIENT errors and improving the success rate of the rebalance command.
This will set the correct `direction` on manual route hops (in/out).
Before this was not set, resulting in WIRE_FEE_INSUFFICIENT errors,
if fee was calcualted inconsistently with `direction`.
* doc: cleanup and key-value for optional parameters
* rebalance: cleanup and refinements
* sendinvoiceless: cleanup and refinements
* summary: reflects upcoming changes of pylightning to_approx_str
* rebalance: check peer connection on local channels
The channel selection query didnt filter for channels not
having a short_channel_id yet (unconfirmed ones).
This lead to a KeyError whenever an unconfirmed channel existed.
This metric is useful on initial sync, when bitcoind is already synced, but lightningd is still working through the blocks.
Comparing the two measures allows to calculate the indexing progress.