mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: generalize tests.
Anchor outputs break many assumptions in our tests: 1. Remove some hardcoded numbers in favor of a fee calc, so we only have to change in one place. FIXME: This should also be done for elements! 2. Do binary search to get feerate for a given closing fee. 3. Don't assume output #0: anchor outputs perturb them. 4. Don't assume we can make 1ksat channels (anchors cost 660 sats!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2402,7 +2402,7 @@ def test_listtransactions(node_factory):
|
||||
"""Sanity check for the listtransactions RPC command"""
|
||||
l1, l2 = node_factory.get_nodes(2, opts=[{}, {}])
|
||||
|
||||
wallettxid = l1.openchannel(l2, 10**4)["wallettxid"]
|
||||
wallettxid = l1.openchannel(l2, 10**5)["wallettxid"]
|
||||
txids = [i["txid"] for tx in l1.rpc.listtransactions()["transactions"]
|
||||
for i in tx["inputs"]]
|
||||
# The txid of the transaction funding the channel is present, and
|
||||
|
||||
Reference in New Issue
Block a user