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

Function account_balance

tests/utils.py:176–184  ·  view source on GitHub ↗
(n, account_id)

Source from the content-addressed store, hash-verified

174
175
176def account_balance(n, account_id):
177 moves = dedupe_moves(n.rpc.call('listcoinmoves_plugin')['coin_moves'])
178 chan_moves = [m for m in moves if m['account_id'] == account_id]
179 assert len(chan_moves) > 0
180 m_sum = Millisatoshi(0)
181 for m in chan_moves:
182 m_sum += Millisatoshi(m['credit_msat'])
183 m_sum -= Millisatoshi(m['debit_msat'])
184 return m_sum
185
186
187def extract_utxos(moves):

Callers 15

test_funding_pushFunction · 0.90
test_withdraw_miscFunction · 0.90
test_closing_simpleFunction · 0.90
test_penalty_inhtlcFunction · 0.90
test_penalty_outhtlcFunction · 0.90
test_penalty_rbf_normalFunction · 0.90
test_penalty_rbf_burnFunction · 0.90
test_onchain_unwatchFunction · 0.90

Calls 3

MillisatoshiClass · 0.90
dedupe_movesFunction · 0.85
callMethod · 0.45

Tested by 15

test_funding_pushFunction · 0.72
test_withdraw_miscFunction · 0.72
test_closing_simpleFunction · 0.72
test_penalty_inhtlcFunction · 0.72
test_penalty_outhtlcFunction · 0.72
test_penalty_rbf_normalFunction · 0.72
test_penalty_rbf_burnFunction · 0.72
test_onchain_unwatchFunction · 0.72