mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
EXPERIMENTAL_FEATURES: enable option_anchor_outputs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -627,11 +627,30 @@ def test_sendpay_cant_afford(node_factory):
|
||||
with pytest.raises(RpcError):
|
||||
l1.pay(l2, 10**9 + 1)
|
||||
|
||||
# This is the fee, which needs to be taken into account for l1.
|
||||
available = 10**9 - 32040000
|
||||
# Reserve is 1%.
|
||||
reserve = 10**7
|
||||
|
||||
# # This is how we recalc constants (v. v. slow!)
|
||||
# minimum = 1
|
||||
# maximum = 10**9
|
||||
# while maximum - minimum > 1:
|
||||
# l1, l2 = node_factory.line_graph(2, fundamount=10**6,
|
||||
# opts={'feerates': (15000, 15000, 15000, 15000)})
|
||||
# try:
|
||||
# l1.pay(l2, (minimum + maximum) // 2)
|
||||
# minimum = (minimum + maximum) // 2
|
||||
# except RpcError:
|
||||
# maximum = (minimum + maximum) // 2
|
||||
# print("{} - {}".format(minimum, maximum))
|
||||
# assert False
|
||||
|
||||
# This is the fee, which needs to be taken into account for l1.
|
||||
if EXPERIMENTAL_FEATURES:
|
||||
# option_anchor_outputs
|
||||
available = 10**9 - 44700000
|
||||
else:
|
||||
available = 10**9 - 32040000
|
||||
|
||||
# Can't pay past reserve.
|
||||
with pytest.raises(RpcError):
|
||||
l1.pay(l2, available)
|
||||
|
||||
Reference in New Issue
Block a user