Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feeadjuster: quick fix to get it back working due to listconfigs API changes #490

Merged
merged 3 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Community curated plugins for Core-Lightning.
| [currencyrate][currencyrate] | A plugin to convert other currencies to BTC using web requests |
| [drain][drain] | Draining, filling and balancing channels with automatic chunks. |
| [event-websocket][event-websocket] | Exposes notifications over a Websocket |
| [feeadjuster][feeadjuster] | Dynamic fees to keep your channels more balanced |
| [go-lnmetrics.reporter][reporter] | Collect and report of the lightning node metrics |
| [graphql][graphql] | Exposes the Core-Lightning API over [graphql][graphql-spec] |
| [invoice-queue][invoice-queue] | Listen to lightning invoices from multiple nodes and send to a redis queue for processing |
Expand Down Expand Up @@ -55,7 +56,6 @@ If you like a plugin from that list, feel free to update and fix it, so we can u
| [commando][commando] | This plugin allows to send commands between nodes |
| [donations][donations] | A simple donations page to accept donations from the web |
| [drain][drain] | Draining, filling and balancing channels with automatic chunks. |
| [feeadjuster][feeadjuster] | Dynamic fees to keep your channels more balanced |
| [helpme][helpme] | This plugin is designed to walk you through setting up a fresh Core-Lightning node |
| [historian][historian] | Archiving the Lightning Network |
| [jitrebalance][jitrebalance] | The JITrebalance plugin |
Expand Down Expand Up @@ -215,7 +215,7 @@ Python plugins developers must ensure their plugin to work with all Python versi
[esplora]: https://github.com/Blockstream/esplora
[event-notifications]: https://lightning.readthedocs.io/PLUGINS.html#event-notifications
[event-websocket]: https://github.com/rbndg/c-lightning-events
[feeadjuster]: https://github.com/lightningd/plugins/tree/master/archived/feeadjuster
[feeadjuster]: https://github.com/lightningd/plugins/tree/master/feeadjuster
[go-api]: https://github.com/niftynei/glightning
[graphql]: https://github.com/nettijoe96/c-lightning-graphql
[graphql-spec]: https://graphql.org/
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ def init(options: dict, configuration: dict, plugin: Plugin, **kwargs):
}
plugin.fee_strategy = fee_strategy_switch.get(options.get("feeadjuster-feestrategy"), get_fees_global)
plugin.median_multiplier = float(options.get("feeadjuster-median-multiplier"))
config = plugin.rpc.listconfigs()
plugin.adj_basefee = config["fee-base"]
plugin.adj_ppmfee = config["fee-per-satoshi"]
config = plugin.rpc.listconfigs()["configs"]
plugin.adj_basefee = config["fee-base"]["value_int"]
plugin.adj_ppmfee = config["fee-per-satoshi"]["value_int"]

# normalize the imbalance percentage value to 0%-50%
if plugin.imbalance < 0 or plugin.imbalance > 1:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import unittest
from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.utils import DEVELOPER, wait_for
from pyln.testing.utils import wait_for


plugin_path = os.path.join(os.path.dirname(__file__), "feeadjuster.py")
Expand Down Expand Up @@ -70,7 +70,6 @@ def sync_gossip(nodes, scids):
wait_for(lambda: node.rpc.listchannels(scid) == n.rpc.listchannels(scid))


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_adjusts(node_factory):
"""
A rather simple network:
Expand Down Expand Up @@ -140,7 +139,6 @@ def test_feeadjuster_adjusts(node_factory):
f'Adjusted fees of {scid_B} with a ratio of 0.2'])


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_imbalance(node_factory):
"""
A rather simple network:
Expand Down Expand Up @@ -217,7 +215,6 @@ def test_feeadjuster_imbalance(node_factory):
wait_for_fees(l2, scids, default_fees[0])


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_big_enough_liquidity(node_factory):
"""
A rather simple network:
Expand Down Expand Up @@ -292,7 +289,6 @@ def test_feeadjuster_big_enough_liquidity(node_factory):
wait_for_not_fees(l2, scids, default_fees[0])


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_median(node_factory):
"""
A rather simple network:
Expand Down