MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_listtransactions

Function test_listtransactions

tests/test_misc.py:3380–3389  ·  view source on GitHub ↗

Sanity check for the listtransactions RPC command

(node_factory)

Source from the content-addressed store, hash-verified

3378
3379
3380def test_listtransactions(node_factory):
3381 """Sanity check for the listtransactions RPC command"""
3382 l1, l2 = node_factory.get_nodes(2, opts=[{}, {}])
3383
3384 wallettxid = l1.openchannel(l2, 10**5)["wallettxid"]
3385 txids = [i["txid"] for tx in l1.rpc.listtransactions()["transactions"]
3386 for i in tx["inputs"]]
3387 # The txid of the transaction funding the channel is present, and
3388 # represented as little endian (like bitcoind and explorers).
3389 assert wallettxid in txids
3390
3391
3392def test_listfunds(node_factory):

Callers

nothing calls this directly

Calls 3

get_nodesMethod · 0.80
openchannelMethod · 0.80
listtransactionsMethod · 0.80

Tested by

no test coverage detected