55from pyln .client import RpcError , Millisatoshi
66from utils import (
77 DEVELOPER , wait_for , TIMEOUT , only_one , sync_blockheight ,
8- expected_node_features , COMPAT , EXPERIMENTAL_FEATURES ,
8+ expected_node_features , COMPAT ,
99 mine_funding_to_announce , default_ln_port
1010)
1111
@@ -124,13 +124,6 @@ def test_announce_address(node_factory, bitcoind):
124124 '::' ],
125125 'log-level' : 'io' ,
126126 'dev-allow-localhost' : None }
127- if not EXPERIMENTAL_FEATURES : # BOLT7 DNS RFC #911
128- opts = {'disable-dns' : None , 'announce-addr' :
129- ['4acth47i6kxnvkewtm6q7ib2s3ufpo5sqbsnzjpbi7utijcltosqemad.onion' ,
130- '1.2.3.4:1234' ,
131- '::' ],
132- 'log-level' : 'io' ,
133- 'dev-allow-localhost' : None }
134127 l1 , l2 = node_factory .get_nodes (2 , opts = [opts , {}])
135128
136129 l1 .rpc .connect (l2 .info ['id' ], 'localhost' , l2 .port )
@@ -140,14 +133,6 @@ def test_announce_address(node_factory, bitcoind):
140133 l1 .wait_channel_active (scid )
141134 l2 .wait_channel_active (scid )
142135
143- if not EXPERIMENTAL_FEATURES : # BOLT7 DNS RFC #911
144- l1 .daemon .wait_for_log (r"\[OUT\] 0101.*47"
145- "010102030404d2"
146- "017f000001...."
147- "0200000000000000000000000000000000...."
148- "04e00533f3e8f2aedaa8969b3d0fa03a96e857bbb28064dca5e147e934244b9ba5023003...." )
149- return
150-
151136 # We should see it send node announce with all addresses (257 = 0x0101)
152137 # Note: local ephemeral port is masked out.
153138 # Note: Since we `disable-dns` it should not announce a resolved IPv4
@@ -173,7 +158,6 @@ def test_announce_address(node_factory, bitcoind):
173158 assert addresses_dns [0 ]['port' ] == 1236
174159
175160
176- @unittest .skipIf (not EXPERIMENTAL_FEATURES , "BOLT7 DNS RFC #911" )
177161@pytest .mark .developer ("gossip without DEVELOPER=1 is slow" )
178162def test_announce_and_connect_via_dns (node_factory , bitcoind ):
179163 """ Test that DNS annoucements propagate and can be used when connecting.
@@ -238,7 +222,6 @@ def test_announce_and_connect_via_dns(node_factory, bitcoind):
238222 l4 .rpc .connect (l1 .info ['id' ])
239223
240224
241- @unittest .skipIf (not EXPERIMENTAL_FEATURES , "BOLT7 DNS RFC #911" )
242225def test_only_announce_one_dns (node_factory , bitcoind ):
243226 # and test that we can't announce more than one DNS address
244227 l1 = node_factory .get_node (expect_fail = True , start = False ,
@@ -247,7 +230,6 @@ def test_only_announce_one_dns(node_factory, bitcoind):
247230 wait_for (lambda : l1 .daemon .is_in_stderr ("Only one DNS can be announced" ))
248231
249232
250- @unittest .skipIf (not EXPERIMENTAL_FEATURES , "BOLT7 DNS RFC #911" )
251233def test_announce_dns_without_port (node_factory , bitcoind ):
252234 """ Checks that the port of a DNS announcement is set to the corresponding
253235 network port. In this case regtest 19846
@@ -259,7 +241,13 @@ def test_announce_dns_without_port(node_factory, bitcoind):
259241 info = l1 .rpc .getinfo ()
260242 assert info ['address' ][0 ]['type' ] == 'dns'
261243 assert info ['address' ][0 ]['address' ] == 'example.com'
262- assert info ['address' ][0 ]['port' ] == 19846
244+
245+ if TEST_NETWORK == 'regtest' :
246+ default_port = 19846
247+ else :
248+ assert TEST_NETWORK == 'liquid-regtest'
249+ default_port = 20735
250+ assert info ['address' ][0 ]['port' ] == default_port
263251
264252
265253@pytest .mark .developer ("needs DEVELOPER=1" )
0 commit comments