mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-19 13:04:37 +01:00
pytest: add a sanity check for the listtransactions command
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
committed by
Christian Decker
parent
1fb9a078b6
commit
1061cd95c9
@@ -2388,3 +2388,16 @@ def test_commitfee_option(node_factory):
|
||||
l2_commit_fees = l2.rpc.call("estimatefees")["unilateral_close"]
|
||||
|
||||
assert l1_commit_fees == 2 * l2_commit_fees == 2 * 4 * mock_wu # WU->VB
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
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"]
|
||||
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
|
||||
# represented as little endian (like bitcoind and explorers).
|
||||
assert wallettxid in txids
|
||||
|
||||
Reference in New Issue
Block a user