| 608 | } |
| 609 | |
| 610 | struct wireaddr *db_col_wireaddr(const tal_t *ctx, |
| 611 | struct db_stmt *stmt, |
| 612 | const char *colname) |
| 613 | { |
| 614 | struct wireaddr *waddr = tal(ctx, struct wireaddr); |
| 615 | const u8 *wire = db_col_arr(tmpctx, stmt, colname, u8); |
| 616 | size_t len = tal_bytelen(wire); |
| 617 | if (fromwire_wireaddr(&wire, &len, waddr) != FROMWIREADDR_OK) |
| 618 | return tal_free(waddr); |
| 619 | return waddr; |
| 620 | } |
| 621 | |
| 622 | void db_col_txid(struct db_stmt *stmt, const char *colname, struct bitcoin_txid *t) |
| 623 | { |
no test coverage detected