mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
pytest: increase channel sizes so they reach min capacity with option_anchor_outputs
With a feerate of 7500perkw and subtracting 660 sats for anchors, a 20,000 sat channel has capacity about 9800 sat, below our default: You gave bad parameters: channel capacity with funding 20000sat, reserves 546sat/546sat, max_htlc_value_in_flight_msat is 18446744073709551615msat, channel capacity is 9818sat, which is below 10000000msat So bump channel amounts. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
9fabf614f4
commit
74e960c20b
@@ -251,12 +251,12 @@ def test_disconnect_opener(node_factory):
|
||||
for d in disconnects:
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
with pytest.raises(RpcError):
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
assert l1.rpc.getpeer(l2.info['id']) is None
|
||||
|
||||
# This one will succeed.
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
|
||||
# Should still only have one peer!
|
||||
assert len(l1.rpc.listpeers()) == 1
|
||||
@@ -277,12 +277,12 @@ def test_disconnect_fundee(node_factory):
|
||||
for d in disconnects:
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
with pytest.raises(RpcError):
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
assert l1.rpc.getpeer(l2.info['id']) is None
|
||||
|
||||
# This one will succeed.
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
|
||||
# Should still only have one peer!
|
||||
assert len(l1.rpc.listpeers()) == 1
|
||||
@@ -301,7 +301,7 @@ def test_disconnect_half_signed(node_factory):
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
with pytest.raises(RpcError):
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
|
||||
# Peer remembers, opener doesn't.
|
||||
assert l1.rpc.getpeer(l2.info['id']) is None
|
||||
@@ -319,7 +319,7 @@ def test_reconnect_signed(node_factory):
|
||||
l1.fundwallet(2000000)
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
|
||||
# They haven't forgotten each other.
|
||||
assert l1.rpc.getpeer(l2.info['id'])['id'] == l2.info['id']
|
||||
@@ -348,7 +348,7 @@ def test_reconnect_openingd(node_factory):
|
||||
|
||||
# l2 closes on l1, l1 forgets.
|
||||
with pytest.raises(RpcError):
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
assert l1.rpc.getpeer(l2.info['id']) is None
|
||||
|
||||
# Reconnect.
|
||||
@@ -359,7 +359,7 @@ def test_reconnect_openingd(node_factory):
|
||||
l2.daemon.wait_for_log('openingd.*Handed peer, entering loop')
|
||||
|
||||
# Should work fine.
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.rpc.fundchannel(l2.info['id'], 25000)
|
||||
l1.daemon.wait_for_log('sendrawtx exit 0')
|
||||
|
||||
l1.bitcoin.generate_block(3)
|
||||
|
||||
Reference in New Issue
Block a user