From d78098725339f4c17bd2f8c9496211b9077038e2 Mon Sep 17 00:00:00 2001 From: daywalker90 Date: Fri, 26 Jun 2026 15:12:09 +0200 Subject: [PATCH 1/2] summary: make `summary-availability-window` an actual integer option We were converting it to an integer anyways --- summary/summary.py | 1 + 1 file changed, 1 insertion(+) diff --git a/summary/summary.py b/summary/summary.py index 867ef68bc..e28e82bf0 100755 --- a/summary/summary.py +++ b/summary/summary.py @@ -395,6 +395,7 @@ def on_rpc_command_callback(plugin, **kwargs): "summary-availability-window", 72, "How many hours the availability should be averaged over.", + "int", ) plugin.add_option( "summary-sortkey", From 854029f8ff9f6187cd59af6e0931f72dcb20b07f Mon Sep 17 00:00:00 2001 From: daywalker90 Date: Fri, 26 Jun 2026 15:21:41 +0200 Subject: [PATCH 2/2] donations: make option `donations-autostart` bool and `donations-web-port` int --- donations/donations.py | 12 +++++++++--- donations/test_donations.py | 10 +++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/donations/donations.py b/donations/donations.py index ff3e7c62f..972eb2dd5 100755 --- a/donations/donations.py +++ b/donations/donations.py @@ -255,11 +255,17 @@ def donationserver(command="start", port=8088): plugin.add_option( - "donations-autostart", "true", "Should the donation server start automatically" + "donations-autostart", + True, + "Should the donation server start automatically", + "bool", ) plugin.add_option( - "donations-web-port", "8088", "Which port should the donation server listen to?" + "donations-web-port", + 8088, + "Which port should the donation server listen to?", + "int", ) @@ -267,7 +273,7 @@ def donationserver(command="start", port=8088): def init(options, configuration, plugin): port = int(options["donations-web-port"]) - if options["donations-autostart"].lower() in ["true", "1"]: + if options["donations-autostart"]: start_server(port) diff --git a/donations/test_donations.py b/donations/test_donations.py index 4e38fb0e7..ce6db9d93 100644 --- a/donations/test_donations.py +++ b/donations/test_donations.py @@ -11,13 +11,21 @@ def test_donation_starts(node_factory): l1 = node_factory.get_node() # Test dynamically - l1.rpc.plugin_start(plugin_path) + l1.rpc.plugin_start(plugin_path, **{"donations-web-port": 8089}) + l1.daemon.logsearch_start = 0 + l1.daemon.wait_for_log( + "plugin-donations.py:.*Starting donation server on port 8089 on all addresses" + ) l1.rpc.plugin_stop(plugin_path) l1.rpc.plugin_start(plugin_path) l1.stop() # Then statically l1.daemon.opts["plugin"] = plugin_path l1.start() + l1.daemon.logsearch_start = 0 + l1.daemon.wait_for_log( + "plugin-donations.py:.*Starting donation server on port 8088 on all addresses" + ) def test_donation_server(node_factory):