mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
connectd: handle custom messages.
This is neater than what we had before, and slightly more general. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: JSON_RPC: `sendcustommsg` now works with any connected peer, even when shutting down a channel.
This commit is contained in:
@@ -2178,8 +2178,8 @@ def test_sendcustommsg(node_factory):
|
||||
# This should work since the peer is currently owned by `channeld`
|
||||
l2.rpc.sendcustommsg(l1.info['id'], msg)
|
||||
l2.daemon.wait_for_log(
|
||||
r'{peer_id}-{owner}-chan#[0-9]: \[OUT\] {msg}'.format(
|
||||
owner='channeld', msg=msg, peer_id=l1.info['id']
|
||||
r'{peer_id}-{owner}: \[OUT\] {msg}'.format(
|
||||
owner='connectd', msg=msg, peer_id=l1.info['id']
|
||||
)
|
||||
)
|
||||
l1.daemon.wait_for_log(r'\[IN\] {}'.format(msg))
|
||||
@@ -2193,8 +2193,8 @@ def test_sendcustommsg(node_factory):
|
||||
# This should work since the peer is currently owned by `openingd`
|
||||
l2.rpc.sendcustommsg(l4.info['id'], msg)
|
||||
l2.daemon.wait_for_log(
|
||||
r'{peer_id}-{owner}-chan#[0-9]: \[OUT\] {msg}'.format(
|
||||
owner='openingd', msg=msg, peer_id=l4.info['id']
|
||||
r'{peer_id}-{owner}: \[OUT\] {msg}'.format(
|
||||
owner='connectd', msg=msg, peer_id=l4.info['id']
|
||||
)
|
||||
)
|
||||
l4.daemon.wait_for_log(r'\[IN\] {}'.format(msg))
|
||||
|
||||
Reference in New Issue
Block a user