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

Function test_empty_node

tests/test_bookkeeper.py:752–770  ·  view source on GitHub ↗

Make sure that the bookkeeper commands don't blow up on an empty accounts database.

(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

750
751
752def test_empty_node(node_factory, bitcoind):
753 """
754 Make sure that the bookkeeper commands don't blow up
755 on an empty accounts database.
756 """
757 l1 = node_factory.get_node()
758
759 bkpr_cmds = [
760 ('channelsapy', []),
761 ('listaccountevents', []),
762 ('listbalances', []),
763 ('listincome', [])]
764 for cmd, params in bkpr_cmds:
765 l1.rpc.call('bkpr-' + cmd, params)
766
767 # inspect fails for non-channel accounts
768 # FIXME: implement for all accounts?
769 with pytest.raises(RpcError, match=r'not supported for non-channel accounts'):
770 l1.rpc.bkpr_inspect('wallet')
771
772
773def test_rebalance_tracking(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 3

bkpr_inspectMethod · 0.80
get_nodeMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected