MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_onionmessage_forward_fail

Function test_onionmessage_forward_fail

tests/test_connection.py:4782–4801  ·  view source on GitHub ↗
(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

4780
4781
4782def test_onionmessage_forward_fail(node_factory, bitcoind):
4783 # The plugin will try to connect to l3, so it needs an advertized address.
4784 l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True,
4785 opts=[{},
4786 {'dev-allow-localhost': None,
4787 'may_reconnect': True,
4788 'dev-no-reconnect': None,
4789 'plugin': os.path.join(os.getcwd(), 'tests/plugins/onionmessage_forward_fail_notification.py'),
4790 },
4791 {'dev-allow-localhost': None,
4792 'dev-no-reconnect': None,
4793 'may_reconnect': True}])
4794
4795 offer = l3.rpc.offer(300, "test_onionmessage_forward_fail")
4796 l2.rpc.disconnect(l3.info['id'], force=True)
4797
4798 # The plugin in l2 fixes up the connection, so this works!
4799 l1.rpc.fetchinvoice(offer['bolt12'])
4800
4801 l2.daemon.is_in_log('plugin-onionmessage_forward_fail_notification.py: Received onionmessage_forward_fail')
4802
4803
4804def test_private_channel_no_reconnect(node_factory):

Callers

nothing calls this directly

Calls 6

line_graphMethod · 0.80
joinMethod · 0.80
fetchinvoiceMethod · 0.80
is_in_logMethod · 0.80
offerMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected