| 453 | } |
| 454 | |
| 455 | static 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 | |
| 470 | static struct utxo **gather_utxos(const tal_t *ctx, |
| 471 | struct db_stmt *stmt STEALS) |
nothing calls this directly
no outgoing calls
no test coverage detected