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

Function dedupe_moves

tests/utils.py:325–338  ·  view source on GitHub ↗
(moves)

Source from the content-addressed store, hash-verified

323
324
325def dedupe_moves(moves):
326 move_set = {}
327 deduped_moves = []
328 for move in moves:
329 # Dupes only pertain to onchain moves?
330 if 'utxo' not in move:
331 deduped_moves.append(move)
332 continue
333
334 outpoint = '{};{}'.format(move['utxo'], move['spending_txid'] if 'spending_txid' in move else 'xx')
335 if outpoint not in move_set:
336 deduped_moves.append(move)
337 move_set[outpoint] = move
338 return deduped_moves
339
340
341def inspect_check_actual(txids, channel_id, actual, exp):

Callers 2

account_balanceFunction · 0.85
check_utxos_channelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected