Browse Source

pytest: add a sanity check for the listtransactions command

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
nifty/pset-pre
Antoine Poinsot 5 years ago
committed by Christian Decker
parent
commit
1061cd95c9
  1. 13
      tests/test_misc.py

13
tests/test_misc.py

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

Loading…
Cancel
Save