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.
When the summary plugin starts, it runs a thread to discover the current
`fiat_per_btc` price. When this was not finished yet, the `if` statement
in line 112 fails, because this in not JavaScript and the property has
to be checked with `hasattr(obj, key)` method in order to not throw an
exception.
A simple plugin that can be used to speed plugin development by having the
plugin under development be reloaded whenever its executable changes, or when
triggered automatically.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
It was returning `null` and we'd have to check the logs or the DB for the
result. This makes it just a bit easier to see what happens.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
- sends payment without an invoice from the receiving node
- uses circular payments: takes the money to the target node, pays in the form of routing fee, and brings some change back
- no plugin/update required on the receiving side