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

Function check_balances

tests/test_pay.py:588–596  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

586
587 # Balances should reflect it.
588 def check_balances():
589 c1 = only_one(l1.rpc.listpeerchannels(l2.info['id'])['channels'])
590 c2 = only_one(l2.rpc.listpeerchannels(l1.info['id'])['channels'])
591 return (
592 c1['to_us_msat'] == 10**6 * 1000 - amt
593 and c1['total_msat'] == 10**6 * 1000
594 and c2['to_us_msat'] == amt
595 and c2['total_msat'] == 10**6 * 1000
596 )
597 wait_for(check_balances)
598
599 # Repeat will "succeed", but won't actually send anything (duplicate)

Callers

nothing calls this directly

Calls 2

only_oneFunction · 0.90
listpeerchannelsMethod · 0.80

Tested by

no test coverage detected