mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
dual-open: use tx-abort instead of warning/errors
When a channel open fails, we use tx-abort instead of warning/error. This means that the peer won't disconnect! And instead when a new message arrives, we'll need to rebuild the dualopend subd (if missing). Makes opens a bit easer to retry (no reconnect needed), as well as keeps the connection alive for other channels we may have with that peer. Changelog-Changed: Experimental-Dual-Fund: open failures don't disconnect, but instead fail the opening process
This commit is contained in:
committed by
Vincenzo Palazzo
parent
96b3b40765
commit
195a2cf44b
@@ -762,8 +762,6 @@ def test_channel_lease_falls_behind(node_factory, bitcoind):
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
rates = l1.rpc.dev_queryrates(l2.info['id'], amount, amount)
|
||||
wait_for(lambda: len(l1.rpc.listpeers(l2.info['id'])['peers']) == 0)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
# l1 leases a channel from l2
|
||||
l1.rpc.fundchannel(l2.info['id'], amount, request_amt=amount,
|
||||
feerate='{}perkw'.format(feerate),
|
||||
@@ -807,8 +805,6 @@ def test_channel_lease_post_expiry(node_factory, bitcoind, chainparams):
|
||||
# l1 leases a channel from l2
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
rates = l1.rpc.dev_queryrates(l2.info['id'], amount, amount)
|
||||
wait_for(lambda: len(l1.rpc.listpeers(l2.info['id'])['peers']) == 0)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.rpc.fundchannel(l2.info['id'], amount, request_amt=amount,
|
||||
feerate='{}perkw'.format(feerate),
|
||||
compact_lease=rates['compact_lease'])
|
||||
@@ -928,8 +924,6 @@ def test_channel_lease_unilat_closes(node_factory, bitcoind):
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
rates = l1.rpc.dev_queryrates(l2.info['id'], amount, amount)
|
||||
wait_for(lambda: len(l1.rpc.listpeers(l2.info['id'])['peers']) == 0)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
# l1 leases a channel from l2
|
||||
l1.rpc.fundchannel(l2.info['id'], amount, request_amt=amount,
|
||||
feerate='{}perkw'.format(feerate),
|
||||
@@ -938,8 +932,6 @@ def test_channel_lease_unilat_closes(node_factory, bitcoind):
|
||||
# l2 leases a channel from l3
|
||||
l2.rpc.connect(l3.info['id'], 'localhost', l3.port)
|
||||
rates = l2.rpc.dev_queryrates(l3.info['id'], amount, amount)
|
||||
wait_for(lambda: len(l2.rpc.listpeers(l3.info['id'])['peers']) == 0)
|
||||
l2.rpc.connect(l3.info['id'], 'localhost', l3.port)
|
||||
l2.rpc.fundchannel(l3.info['id'], amount, request_amt=amount,
|
||||
feerate='{}perkw'.format(feerate), minconf=0,
|
||||
compact_lease=rates['compact_lease'])
|
||||
@@ -1043,8 +1035,6 @@ def test_channel_lease_lessor_cheat(node_factory, bitcoind, chainparams):
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
rates = l1.rpc.dev_queryrates(l2.info['id'], amount, amount)
|
||||
wait_for(lambda: len(l1.rpc.listpeers(l2.info['id'])['peers']) == 0)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
# l1 leases a channel from l2
|
||||
l1.rpc.fundchannel(l2.info['id'], amount, request_amt=amount,
|
||||
feerate='{}perkw'.format(feerate),
|
||||
@@ -1122,8 +1112,6 @@ def test_channel_lease_lessee_cheat(node_factory, bitcoind, chainparams):
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
rates = l1.rpc.dev_queryrates(l2.info['id'], amount, amount)
|
||||
wait_for(lambda: len(l1.rpc.listpeers(l2.info['id'])['peers']) == 0)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
# l1 leases a channel from l2
|
||||
l1.rpc.fundchannel(l2.info['id'], amount, request_amt=amount,
|
||||
feerate='{}perkw'.format(feerate),
|
||||
|
||||
Reference in New Issue
Block a user