Browse Source

chore: fix typo in openchannel hook log

Nit: The underscore in "openchannel_hook" is wrong, bcause the name of
the hook is just "openchannel". The "_hook" implied this to be part of
the name.

Changelog-None
master
Michael Schmoock 4 years ago
committed by Rusty Russell
parent
commit
bdf0d60fd6
  1. 2
      lightningd/dual_open_control.c
  2. 4
      lightningd/opening_control.c
  3. 2
      tests/test_plugin.py

2
lightningd/dual_open_control.c

@ -387,7 +387,7 @@ openchannel2_hook_cb(struct openchannel2_payload *payload STEALS)
if (payload->err_msg) {
log_debug(dualopend->ld->log,
"openchannel2_hook rejects and says '%s'",
"openchannel2 hook rejects and says '%s'",
payload->err_msg);
msg = towire_dualopend_fail(NULL, payload->err_msg);
return subd_send_msg(dualopend, take(msg));

4
lightningd/opening_control.c

@ -707,7 +707,7 @@ openchannel_hook_deserialize(struct openchannel_hook_payload *payload,
if (t_errmsg)
payload->errmsg = json_strdup(payload, buffer, t_errmsg);
log_debug(openingd->ld->log,
"openchannel_hook rejects and says '%s'",
"openchannel hook rejects and says '%s'",
payload->errmsg);
if (t_closeto)
fatal("Plugin rejected openchannel but also set close_to");
@ -724,7 +724,7 @@ openchannel_hook_deserialize(struct openchannel_hook_payload *payload,
/* First plugin can set close_to. Log others. */
if (payload->our_upfront_shutdown_script != NULL) {
log_broken(openingd->ld->log,
"openchannel_hook close_to address was"
"openchannel hook close_to address was"
" already set by other plugin. Ignoring!");
return true;
}

2
tests/test_plugin.py

@ -644,7 +644,7 @@ def test_openchannel_hook_chaining(node_factory, bitcoind):
l1, l2 = node_factory.line_graph(2, fundchannel=False, opts=opts)
l1.fundwallet(10**6)
hook_msg = "openchannel2?_hook rejects and says '"
hook_msg = "openchannel2? hook rejects and says '"
# 100005sat fundchannel should fail fatal() for l2
# because hook_accepter.py rejects on that amount 'for a reason'
with pytest.raises(RpcError, match=r'They sent error channel'):

Loading…
Cancel
Save