From 980a9517c6cbf10885ab8f93f901afd9041b2ef5 Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Tue, 22 Sep 2020 12:00:10 +0200 Subject: [PATCH] fix: openchannel_hook log BROKEN on dup close_to Changelog-None --- lightningd/opening_control.c | 6 +++--- tests/test_plugin.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index fcf124664..93f6f45b4 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -688,9 +688,9 @@ openchannel_hook_deserialize(struct openchannel_hook_payload *payload, if (t_closeto) { /* First plugin can set close_to. Log others. */ if (payload->our_upfront_shutdown_script != NULL) { - log_unusual(openingd->ld->log, - "openchannel_hook close_to address was" - " already set by other plugin. Ignoring!"); + log_broken(openingd->ld->log, + "openchannel_hook close_to address was" + " already set by other plugin. Ignoring!"); return true; } switch (json_to_address_scriptpubkey(tmpctx, chainparams, diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 10ef095e6..7cc4d61c5 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -587,7 +587,7 @@ def test_openchannel_hook_error_handling(node_factory, bitcoind): # next fundchannel should fail fatal() for l2 with pytest.raises(RpcError, match=r'Owning subdaemon openingd died'): l1.rpc.fundchannel(l2.info['id'], 100004) - assert l2.daemon.is_in_log("Plugin rejected openchannel but also set close_to") + assert l2.daemon.is_in_log("BROKEN.*Plugin rejected openchannel but also set close_to") def test_openchannel_hook_chaining(node_factory, bitcoind):