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

Function dedupe_moves

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

Source from the content-addressed store, hash-verified

300
301
302def dedupe_moves(moves):
303 move_set = {}
304 deduped_moves = []
305 for move in moves:
306 # Dupes only pertain to onchain moves?
307 if 'utxo_txid' not in move:
308 deduped_moves.append(move)
309 continue
310
311 outpoint = '{}:{};{}'.format(move['utxo_txid'], move['vout'], move['txid'] if 'txid' in move else 'xx')
312 if outpoint not in move_set:
313 deduped_moves.append(move)
314 move_set[outpoint] = move
315 return deduped_moves
316
317
318def 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