fix: openchannel_hook log BROKEN on dup close_to

Changelog-None
This commit is contained in:
Michael Schmoock 2020-09-22 12:00:10 +02:00 committed by Rusty Russell
parent a351b9bf2f
commit 980a9517c6
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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):