| 490 | } |
| 491 | |
| 492 | struct wally_psbt *db_col_psbt(const tal_t *ctx, struct db_stmt *stmt, const char *colname) |
| 493 | { |
| 494 | struct wally_psbt *psbt; |
| 495 | size_t col = db_query_colnum(stmt, colname); |
| 496 | const u8 *src = db_column_blob(stmt, col); |
| 497 | size_t len = db_column_bytes(stmt, col); |
| 498 | |
| 499 | db_column_null_warn(stmt, colname, col); |
| 500 | psbt = psbt_from_bytes(ctx, src, len); |
| 501 | psbt_set_version(psbt, 2); |
| 502 | return psbt; |
| 503 | } |
| 504 | |
| 505 | struct bitcoin_tx *db_col_psbt_to_tx(const tal_t *ctx, struct db_stmt *stmt, const char *colname) |
| 506 | { |
no test coverage detected