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

Function test_balance

tests/test_connection.py:328–335  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

326
327
328def test_balance(node_factory):
329 l1, l2 = node_factory.line_graph(2, fundchannel=True)
330 p1 = only_one(l1.rpc.listpeerchannels(peer_id=l2.info['id'])['channels'])
331 p2 = only_one(l2.rpc.listpeerchannels(l1.info['id'])['channels'])
332 assert p1['to_us_msat'] == 10**6 * 1000
333 assert p1['total_msat'] == 10**6 * 1000
334 assert p2['to_us_msat'] == 0
335 assert p2['total_msat'] == 10**6 * 1000
336
337
338@unittest.skipIf(TEST_NETWORK != 'regtest', "Fee computation and limits are network specific")

Callers

nothing calls this directly

Calls 3

only_oneFunction · 0.90
line_graphMethod · 0.80
listpeerchannelsMethod · 0.80

Tested by

no test coverage detected