mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
onionmessages: remove obsolete onion message parsing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -4591,27 +4591,6 @@ def test_fetchinvoice_3hop(node_factory, bitcoind):
|
||||
|
||||
l1.rpc.call('fetchinvoice', {'offer': offer1['bolt12']})
|
||||
|
||||
# Make sure l4 handled both onions before shutting down
|
||||
l1.daemon.wait_for_log(r'plugin-fetchinvoice: Received modern onion .*obs2\\":false')
|
||||
l1.daemon.wait_for_log(r'plugin-fetchinvoice: No match for modern onion.*obs2\\":true')
|
||||
|
||||
# Test with obsolete onion.
|
||||
l4.stop()
|
||||
l4.daemon.opts['dev-no-modern-onion'] = None
|
||||
l4.start()
|
||||
l4.rpc.connect(l3.info['id'], 'localhost', l3.port)
|
||||
|
||||
l1.rpc.call('fetchinvoice', {'offer': offer1['bolt12']})
|
||||
|
||||
# Test with modern onion.
|
||||
l4.stop()
|
||||
del l4.daemon.opts['dev-no-modern-onion']
|
||||
l4.daemon.opts['dev-no-obsolete-onion'] = None
|
||||
l4.start()
|
||||
l4.rpc.connect(l3.info['id'], 'localhost', l3.port)
|
||||
|
||||
l1.rpc.call('fetchinvoice', {'offer': offer1['bolt12']})
|
||||
|
||||
|
||||
def test_fetchinvoice(node_factory, bitcoind):
|
||||
# We remove the conversion plugin on l3, causing it to get upset.
|
||||
@@ -4908,10 +4887,8 @@ def test_dev_rawrequest(node_factory):
|
||||
assert 'invoice' in ret
|
||||
|
||||
|
||||
def do_test_sendinvoice(node_factory, bitcoind, disable):
|
||||
def test_sendinvoice(node_factory, bitcoind):
|
||||
l2opts = {'experimental-offers': None}
|
||||
if disable:
|
||||
l2opts[disable] = None
|
||||
l1, l2 = node_factory.line_graph(2, wait_for_announce=True,
|
||||
opts=[{'experimental-offers': None},
|
||||
l2opts])
|
||||
@@ -4989,20 +4966,6 @@ def do_test_sendinvoice(node_factory, bitcoind, disable):
|
||||
assert out['amount_received_msat'] == Millisatoshi(10000000)
|
||||
|
||||
|
||||
def test_sendinvoice(node_factory, bitcoind):
|
||||
do_test_sendinvoice(node_factory, bitcoind, None)
|
||||
|
||||
|
||||
@pytest.mark.developer("needs to --dev-no-obsolete-onion")
|
||||
def test_sendinvoice_modern(node_factory, bitcoind):
|
||||
do_test_sendinvoice(node_factory, bitcoind, 'dev-no-obsolete-onion')
|
||||
|
||||
|
||||
@pytest.mark.developer("needs to --dev-no-modern-onion")
|
||||
def test_sendinvoice_obsolete(node_factory, bitcoind):
|
||||
do_test_sendinvoice(node_factory, bitcoind, 'dev-no-modern-onion')
|
||||
|
||||
|
||||
def test_self_pay(node_factory):
|
||||
"""Repro test for issue 4345: pay ourselves via the pay plugin.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user