mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
1c26ebdb31
We might only have seen one side of the channel, as shown below. Wait for both: ``` _____________________________ test_wumbo_channels ______________________________ [gw2] linux -- Python 3.7.13 /opt/hostedtoolcache/Python/3.7.13/x64/bin/python3 node_factory = <pyln.testing.utils.NodeFactory object at 0x7f5d51743b10> bitcoind = <pyln.testing.utils.BitcoinD object at 0x7f5d51699d10> @pytest.mark.openchannel('v1') @pytest.mark.openchannel('v2') def test_wumbo_channels(node_factory, bitcoind): l1, l2, l3 = node_factory.get_nodes(3, opts=[{'large-channels': None}, {'large-channels': None}, {}]) conn = l1.rpc.connect(l2.info['id'], 'localhost', port=l2.port) expected_features = expected_peer_features(wumbo_channels=True) if l1.config('experimental-dual-fund'): expected_features = expected_peer_features(wumbo_channels=True, extra=[21, 29]) assert conn['features'] == expected_features assert only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['features'] == expected_features # Now, can we open a giant channel? l1.fundwallet(1 << 26) l1.rpc.fundchannel(l2.info['id'], 1 << 24) # Get that mined, and announced. bitcoind.generate_block(6, wait_for_mempool=1) # Connect l3, get gossip. l3.rpc.connect(l1.info['id'], 'localhost', port=l1.port) wait_for(lambda: len(l3.rpc.listnodes(l1.info['id'])['nodes']) == 1) wait_for(lambda: 'features' in only_one(l3.rpc.listnodes(l1.info['id'])['nodes'])) # Make sure channel capacity is what we expected. > assert ([c['amount_msat'] for c in l3.rpc.listchannels()['channels']] == [Millisatoshi(str(1 << 24) + "sat")] * 2) E assert [16777216000msat] == [16777216000m...777216000msat] E Right contains one more item: 16777216000msat E Full diff: E - [16777216000msat, 16777216000msat] E + [16777216000msat] ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> |
||
---|---|---|
.. | ||
data | ||
fuzz | ||
plugins | ||
vectors | ||
benchmark.py | ||
conftest.py | ||
db.py | ||
fixtures.py | ||
test_cln_rs.py | ||
test_closing.py | ||
test_connection.py | ||
test_db.py | ||
test_gossip.py | ||
test_invoices.py | ||
test_misc.py | ||
test_onion.py | ||
test_opening.py | ||
test_pay.py | ||
test_plugin.py | ||
test_wallet.py | ||
utils.py | ||
valgrind-suppressions.txt |