mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-20 21:44:29 +01:00
lightningd: don't route private channels via real scid.
Again, we should use the real channel_type, but we approximate. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Protocol: private channels will only route using short-channel-ids if channel opened with option_scid_alias-supporting peer.
This commit is contained in:
committed by
neil saitug
parent
cfe6b06fb5
commit
8a9ce55345
@@ -1478,7 +1478,6 @@ def test_buy_liquidity_ad_no_v2(node_factory, bitcoind):
|
||||
compact_lease='029a002d000000004b2003e8')
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True, reason="We don't implement yet")
|
||||
def test_scid_alias_private(node_factory, bitcoind):
|
||||
"""Test that we don't allow use of real scid for scid_alias-type channels"""
|
||||
l1, l2, l3 = node_factory.line_graph(3, fundchannel=False, opts=[{}, {},
|
||||
|
||||
@@ -1857,7 +1857,7 @@ def test_pay_routeboost(node_factory, bitcoind):
|
||||
assert 'routehint_modifications' not in only_one(status['pay'])
|
||||
assert 'local_exclusions' not in only_one(status['pay'])
|
||||
attempts = only_one(status['pay'])['attempts']
|
||||
scid34 = only_one(l3.rpc.listpeers(l4.info['id'])['peers'])['channels'][0]['short_channel_id']
|
||||
scid34 = only_one(l3.rpc.listpeers(l4.info['id'])['peers'])['channels'][0]['alias']['local']
|
||||
assert(len(attempts) == 1)
|
||||
a = attempts[0]
|
||||
assert(a['strategy'] == "Initial attempt")
|
||||
@@ -1866,7 +1866,7 @@ def test_pay_routeboost(node_factory, bitcoind):
|
||||
|
||||
# With dev-route option we can test longer routehints.
|
||||
if DEVELOPER:
|
||||
scid45 = only_one(l4.rpc.listpeers(l5.info['id'])['peers'])['channels'][0]['short_channel_id']
|
||||
scid45 = only_one(l4.rpc.listpeers(l5.info['id'])['peers'])['channels'][0]['alias']['local']
|
||||
routel3l4l5 = [{'id': l3.info['id'],
|
||||
'short_channel_id': scid34,
|
||||
'fee_base_msat': 1000,
|
||||
@@ -3606,7 +3606,7 @@ def test_keysend_routehint(node_factory):
|
||||
routehints = [
|
||||
[
|
||||
{
|
||||
'scid': l3.rpc.listpeers()['peers'][0]['channels'][0]['short_channel_id'],
|
||||
'scid': l3.rpc.listpeers()['peers'][0]['channels'][0]['alias']['remote'],
|
||||
'id': l2.info['id'],
|
||||
'feebase': '1msat',
|
||||
'feeprop': 10,
|
||||
|
||||
Reference in New Issue
Block a user