Commit Graph

14 Commits

Author SHA1 Message Date
darosior
94c641ea58 rebalance: restore Python3.5 compat
Support old snakes that have not shed yet
2019-09-06 17:26:23 +02:00
Matt Whitlock
477bdd8f61 rebalance: round HTLC fees up
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.
2019-08-29 14:13:57 +02:00
Michael Schmoock
cd1b751f53 rebalance: fix route direction
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`.
2019-06-11 15:56:36 +02:00
Michael Schmoock
300b963c9d rebalance: fix amount None 2019-06-03 19:26:26 +02:00
Michael Schmoock
f6309a2da0 Cleanup rebalance sendinvoiceless (#33)
* 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
2019-05-31 22:52:43 +02:00
Michael Schmoock
89c95e4fe8 rebalance: fix issue 29
I think this issue happens on older version of pylightning only.
2019-05-23 12:32:25 +02:00
Michael Schmoock
4c46275e38 fix: rebalance channel selection
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.
2019-05-13 21:23:59 +02:00
Gálli Zoltán
5416decde2 rebalance: exclude all own channels from getroute
fix for #17
2019-05-08 12:47:59 +02:00
Michael Schmoock
799eb51528 fix: workaround for outdated pylightning versions #2601 2019-05-01 22:38:51 +02:00
Michael Schmoock
5efb86da46 feat: calculate optional amount 2019-05-01 22:38:51 +02:00
Michael Schmoock
ee9eaa9e31 chore: renames channel_id to scid where aprropriate 2019-05-01 22:38:51 +02:00
Michael Schmoock
3d9b3c8a22 chore: rewording peer2channel method to peer_from_scid 2019-05-01 22:38:51 +02:00
Gálli Zoltán
f22615ed65 using Millisatoshi 2019-04-16 12:05:19 +02:00
Gálli Zoltán
22f5579365 rebalance plugin in python
- this plugin helps to move some liquidity between your channels using circular payments
- previous conversations here: https://github.com/ElementsProject/lightning/pull/2567
2019-04-16 11:59:41 +02:00