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

Function check_balance_snaps

tests/utils.py:112–119  ·  view source on GitHub ↗
(n, expected_bals)

Source from the content-addressed store, hash-verified

110
111
112def check_balance_snaps(n, expected_bals):
113 snaps = n.rpc.listsnapshots()['balance_snapshots']
114 for snap, exp in zip(snaps, expected_bals):
115 assert snap['blockheight'] == exp['blockheight']
116 for acct, exp_acct in zip(snap['accounts'], exp['accounts']):
117 # FIXME: also check 'account_id's (these change every run)
118 for item in ['balance_msat']:
119 assert Millisatoshi(acct[item]) == Millisatoshi(exp_acct[item])
120
121
122def check_coin_moves(n, account_id, expected_moves, chainparams):

Callers 1

Calls 1

MillisatoshiClass · 0.90

Tested by 1