pytest: add a sanity check for the listtransactions command

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
Antoine Poinsot
2020-05-22 11:38:15 +02:00
committed by Christian Decker
parent 1fb9a078b6
commit 1061cd95c9

View File

@@ -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