| 587 | } |
| 588 | |
| 589 | struct bitcoin_tx *pull_bitcoin_tx(const tal_t *ctx, const u8 **cursor, |
| 590 | size_t *max) |
| 591 | { |
| 592 | struct bitcoin_tx *tx = tal(ctx, struct bitcoin_tx); |
| 593 | tx->wtx = pull_wtx(tx, cursor, max); |
| 594 | if (!tx->wtx) |
| 595 | return tal_free(tx); |
| 596 | |
| 597 | tal_add_destructor(tx, bitcoin_tx_destroy); |
| 598 | tx->chainparams = chainparams; |
| 599 | tx->psbt = new_psbt(tx, tx->wtx); |
| 600 | if (!tx->psbt) |
| 601 | return tal_free(tx); |
| 602 | |
| 603 | return tx; |
| 604 | } |
| 605 | |
| 606 | struct bitcoin_tx *bitcoin_tx_from_hex(const tal_t *ctx, const char *hex, |
| 607 | size_t hexlen) |
no test coverage detected