mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
pytest: test sendonionmessage.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
42af815932
commit
e3dfba8944
@ -10,6 +10,7 @@ from pyln.testing.utils import (
|
||||
TailableProc, env
|
||||
)
|
||||
from ephemeral_port_reserve import reserve
|
||||
from utils import EXPERIMENTAL_FEATURES
|
||||
|
||||
import json
|
||||
import os
|
||||
@ -2177,6 +2178,27 @@ def test_sendcustommsg(node_factory):
|
||||
serialized=serialized, peer_id=l2.info['id']))
|
||||
|
||||
|
||||
@unittest.skipIf(not EXPERIMENTAL_FEATURES, "Needs sendonionmessage")
|
||||
def test_sendonionmessage(node_factory):
|
||||
l1, l2, l3 = node_factory.line_graph(3)
|
||||
|
||||
l1.rpc.call('sendonionmessage',
|
||||
{'hops':
|
||||
[{'id': l2.info['id']},
|
||||
{'id': l3.info['id']}]})
|
||||
assert l3.daemon.wait_for_log('Got onionmsg')
|
||||
|
||||
# Now by SCID.
|
||||
l1.rpc.call('sendonionmessage',
|
||||
{'hops':
|
||||
[{'id': l2.info['id'],
|
||||
'short_channel_id': l2.get_channel_scid(l3)},
|
||||
{'id': l3.info['id']}]})
|
||||
assert l3.daemon.wait_for_log('Got onionmsg')
|
||||
|
||||
# FIXME: Test blinded path!
|
||||
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "needs --dev-force-privkey")
|
||||
def test_getsharedsecret(node_factory):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user