mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
doc: update BOLTs to bc86304b4b0af5fd5ce9d24f74e2ebbceb7e2730
This contains the zeroconf stuff, with funding_locked renamed to channel_ready. I change that everywhere, and try to fix up the comments. Also the `alias` field is called `short_channel_id`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: Protocol: `funding_locked` is now called `channel_ready` as per latest BOLTs.
This commit is contained in:
@@ -1785,7 +1785,7 @@ def test_onchain_first_commit(node_factory, bitcoind):
|
||||
coin_mvt_plugin = os.path.join(os.getcwd(), 'tests/plugins/coin_movements.py')
|
||||
|
||||
# HTLC 1->2, 1 fails just after funding.
|
||||
disconnects = ['+WIRE_FUNDING_LOCKED', 'permfail']
|
||||
disconnects = ['+WIRE_CHANNEL_READY', 'permfail']
|
||||
# Make locktime different, as we once had them reversed!
|
||||
l1, l2 = node_factory.line_graph(2, opts=[{'disconnect': disconnects,
|
||||
'plugin': coin_mvt_plugin},
|
||||
|
||||
@@ -679,7 +679,7 @@ def test_reconnect_no_update(node_factory, executor, bitcoind):
|
||||
reconnects. See comments for details.
|
||||
|
||||
"""
|
||||
disconnects = ["-WIRE_FUNDING_LOCKED", "-WIRE_SHUTDOWN"]
|
||||
disconnects = ["-WIRE_CHANNEL_READY", "-WIRE_SHUTDOWN"]
|
||||
# Allow bad gossip because it might receive WIRE_CHANNEL_UPDATE before
|
||||
# announcement of the disconnection
|
||||
l1 = node_factory.get_node(may_reconnect=True, allow_bad_gossip=True)
|
||||
@@ -715,8 +715,8 @@ def test_reconnect_no_update(node_factory, executor, bitcoind):
|
||||
@pytest.mark.openchannel('v2')
|
||||
def test_reconnect_normal(node_factory):
|
||||
# Should reconnect fine even if locked message gets lost.
|
||||
disconnects = ['-WIRE_FUNDING_LOCKED',
|
||||
'+WIRE_FUNDING_LOCKED']
|
||||
disconnects = ['-WIRE_CHANNEL_READY',
|
||||
'+WIRE_CHANNEL_READY']
|
||||
l1 = node_factory.get_node(disconnect=disconnects,
|
||||
may_reconnect=True)
|
||||
l2 = node_factory.get_node(may_reconnect=True)
|
||||
@@ -2234,7 +2234,7 @@ def test_channel_persistence(node_factory, bitcoind, executor):
|
||||
# Fire off a sendpay request, it'll get interrupted by a restart
|
||||
executor.submit(l1.pay, l2, 10000)
|
||||
# Wait for it to be committed to, i.e., stored in the DB
|
||||
l1.daemon.wait_for_log('peer_in WIRE_FUNDING_LOCKED')
|
||||
l1.daemon.wait_for_log('peer_in WIRE_CHANNEL_READY')
|
||||
l1.daemon.wait_for_log('peer_in WIRE_COMMITMENT_SIGNED')
|
||||
|
||||
# Stop l2, l1 will reattempt to connect
|
||||
|
||||
@@ -1274,13 +1274,13 @@ def test_zeroconf_mindepth(bitcoind, node_factory):
|
||||
assert l2.db.query('SELECT minimum_depth FROM channels') == [{'minimum_depth': 2}]
|
||||
|
||||
bitcoind.generate_block(2, wait_for_mempool=1) # Confirm on the l2 side.
|
||||
l2.daemon.wait_for_log(r'peer_out WIRE_FUNDING_LOCKED')
|
||||
l2.daemon.wait_for_log(r'peer_out WIRE_CHANNEL_READY')
|
||||
# l1 should not be sending funding_locked/channel_ready yet, it is
|
||||
# configured to wait for 6 confirmations.
|
||||
assert not l1.daemon.is_in_log(r'peer_out WIRE_FUNDING_LOCKED')
|
||||
assert not l1.daemon.is_in_log(r'peer_out WIRE_CHANNEL_READY')
|
||||
|
||||
bitcoind.generate_block(4) # Confirm on the l2 side.
|
||||
l1.daemon.wait_for_log(r'peer_out WIRE_FUNDING_LOCKED')
|
||||
l1.daemon.wait_for_log(r'peer_out WIRE_CHANNEL_READY')
|
||||
|
||||
wait_for(lambda: l1.rpc.listpeers()['peers'][0]['channels'][0]['state'] == "CHANNELD_NORMAL")
|
||||
wait_for(lambda: l2.rpc.listpeers()['peers'][0]['channels'][0]['state'] == "CHANNELD_NORMAL")
|
||||
@@ -1318,11 +1318,11 @@ def test_zeroconf_open(bitcoind, node_factory):
|
||||
assert l2.db.query('SELECT minimum_depth FROM channels') == [{'minimum_depth': 0}]
|
||||
|
||||
l1.daemon.wait_for_logs([
|
||||
r'peer_in WIRE_FUNDING_LOCKED',
|
||||
r'peer_in WIRE_CHANNEL_READY',
|
||||
r'Peer told us that they\'ll use alias=[0-9x]+ for this channel',
|
||||
])
|
||||
l2.daemon.wait_for_logs([
|
||||
r'peer_in WIRE_FUNDING_LOCKED',
|
||||
r'peer_in WIRE_CHANNEL_READY',
|
||||
r'Peer told us that they\'ll use alias=[0-9x]+ for this channel',
|
||||
])
|
||||
|
||||
@@ -1606,8 +1606,8 @@ def test_zeroconf_multichan_forward(node_factory):
|
||||
l2.fundwallet(10**7)
|
||||
l2.rpc.fundchannel(l3.info['id'], 2 * 10**6, mindepth=0)
|
||||
|
||||
l2.daemon.wait_for_log(r'peer_in WIRE_FUNDING_LOCKED')
|
||||
l3.daemon.wait_for_log(r'peer_in WIRE_FUNDING_LOCKED')
|
||||
l2.daemon.wait_for_log(r'peer_in WIRE_CHANNEL_READY')
|
||||
l3.daemon.wait_for_log(r'peer_in WIRE_CHANNEL_READY')
|
||||
|
||||
inv = l3.rpc.invoice(amount_msat=10000, label='lbl1', description='desc')['bolt11']
|
||||
l1.rpc.pay(inv)
|
||||
|
||||
Reference in New Issue
Block a user