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

Function cmp_utxo

wallet/wallet.c:455–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453}
454
455static int cmp_utxo(struct utxo *const *a,
456 struct utxo *const *b,
457 void *unused)
458{
459 int ret = memcmp(&(*a)->outpoint.txid, &(*b)->outpoint.txid,
460 sizeof((*a)->outpoint.txid));
461 if (ret)
462 return ret;
463 if ((*a)->outpoint.n < (*b)->outpoint.n)
464 return -1;
465 else if ((*a)->outpoint.n > (*b)->outpoint.n)
466 return 1;
467 return 0;
468}
469
470static struct utxo **gather_utxos(const tal_t *ctx,
471 struct db_stmt *stmt STEALS)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected