connected_hook: allow hook to specify an error message.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-04-16 09:41:48 +09:30
committed by Christian Decker
parent a314bc62fc
commit 7f7ad4f89f
5 changed files with 22 additions and 1 deletions

View File

@@ -164,6 +164,11 @@ def test_plugin_connected_hook(node_factory):
l3.connect(l1)
l1.daemon.wait_for_log(r"{} is in reject list".format(l3.info['id']))
# FIXME: this error occurs *after* connection, so we connect then drop.
l3.daemon.wait_for_log(r"lightning_openingd-{} chan #1: peer_in WIRE_ERROR"
.format(l1.info['id']))
l3.daemon.wait_for_log(r"You are in reject list")
peer = l1.rpc.listpeers(l3.info['id'])['peers']
assert(peer == [] or not peer[0]['connected'])