The usage of fund_channel is no longer recommended as of
main repo e802b128
The return value of pyln funchannel has changed to a tuple
as of main repo de34f08b
The usage of fundchannel is no longer supported by Travis
for unknown reasons
Be sure to catch the actual line we want to catch (one per scid), and
remove an unused variable.
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
- forcefeeadjust method becomes feeadjust
- call feeadjust in plugin init
- prevent calling setchannelfee multiple times with the same parameters
- new optional get_ratio_hard and get_ratio_soft functions
- safety check in get_ratio functions
- maybe_setchannelfee is more concise thanks to @m-schmoock
- new test cases by @m-schmoock
After start using this plugin, now you have a method to adjust fees for all of your channels. Ideally called only once.
Also, now it is allowed to customize "feeadjuster-ratio-base" to set up fee ratio:
New fee = <default fee> * feeadjuster-ratio-base**(0.5 - <our liquidity ratio>)
Caching writes was causing us some issues if the startup of
`lightningd` didn't complete, i.e., the writes would happen on the
live DB, but we'd forget about them. Since we have the backup.lock
file in same directory as the plugin is running in, we no longer have
to defer the writes. This hugely simplifies our logic.
Fixes#155
Changelog-Fixed: backup: The plugin doesn't lose sync anymore if the startup is interrupted
We'll start relying solely on the `backup.lock` file generated by the
`backup-cli`. But we keep the option so we don't automatically break
all configs that simply updated.
Somehow, it happened:
```
**BROKEN** lightningd: Plugin for htlc_accepted returned non-result response {"jsonrpc": "2.0", "id": 23, "error": {"code": -32600, "message": "Error while processing htlc_accepted: 'NoneType' object is not subscriptable", "traceback": "Traceback (most recent call last):\n File \"/home/lightningd/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 440, in _dispatch_request\n result = self._exec_func(method.func, request)\n File \"/home/lightningd/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 427, in _exec_func\n return func(*ba.args, **ba.kwargs)\n File \"/home/lightningd/.lightning/plugins/jitrebalance/jitrebalance.py\", line 172, in on_htlc_accepted\n if not peer['connected'] or chan['state'] != \"CHANNELD_NORMAL\":\nTypeError: 'NoneType' object is not subscriptable\n"}
```
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>