mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
043c4ae5eb
Make sure plugin has got message to connectd before sending! ``` def test_even_sendcustommsg(node_factory): l1, l2 = node_factory.get_nodes(2, opts={'log-level': 'io', 'allow_warning': True}) l1.connect(l2) # Even-numbered message msg = hex(43690)[2:] + ('ff' * 30) + 'bb' # l2 will hang up when it gets this. l1.rpc.sendcustommsg(l2.info['id'], msg) l2.daemon.wait_for_log(r'\[IN\] {}'.format(msg)) l1.daemon.wait_for_log('Invalid unknown even msg') wait_for(lambda: l1.rpc.listpeers(l2.info['id'])['peers'] == []) # Now with a plugin which allows it l1.connect(l2) l2.rpc.plugin_start(os.path.join(os.getcwd(), "tests/plugins/allow_even_msgs.py")) l1.rpc.sendcustommsg(l2.info['id'], msg) l2.daemon.wait_for_log(r'\[IN\] {}'.format(msg)) > l2.daemon.wait_for_log(r'allow_even_msgs.*Got message 43690') tests/test_misc.py:3623: ... > raise TimeoutError('Unable to find "{}" in logs.'.format(exs)) E TimeoutError: Unable to find "[re.compile('allow_even_msgs.*Got message 43690')]" in logs. contrib/pyln-testing/pyln/testing/utils.py:327: TimeoutError ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> |
||
---|---|---|
.. | ||
test | ||
connectd_gossipd_wire.csv | ||
connectd_wire.csv | ||
connectd.c | ||
connectd.h | ||
gossip_rcvd_filter.c | ||
gossip_rcvd_filter.h | ||
gossip_store.c | ||
gossip_store.h | ||
handshake.c | ||
handshake.h | ||
Makefile | ||
multiplex.c | ||
multiplex.h | ||
netaddress.c | ||
netaddress.h | ||
onion_message.c | ||
onion_message.h | ||
peer_exchange_initmsg.c | ||
peer_exchange_initmsg.h | ||
sha1.c | ||
sha1.h | ||
tor_autoservice.c | ||
tor_autoservice.h | ||
tor.c | ||
tor.h | ||
websocketd.c |