Skip to content

Commit

Permalink
fix: openchannel_hook log BROKEN on dup close_to
Browse files Browse the repository at this point in the history
Changelog-None
  • Loading branch information
m-schmoock authored and rustyrussell committed Sep 24, 2020
1 parent a351b9b commit 980a951
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lightningd/opening_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 980a951

Please sign in to comment.