| 348 | } |
| 349 | |
| 350 | void bitcoin_tx_input_set_script(struct bitcoin_tx *tx, int innum, u8 *script) |
| 351 | { |
| 352 | struct wally_psbt_input *in; |
| 353 | |
| 354 | tal_wally_start(); |
| 355 | wally_tx_set_input_script(tx->wtx, innum, script, tal_bytelen(script)); |
| 356 | tal_wally_end(tx->wtx); |
| 357 | |
| 358 | /* Also add to the psbt */ |
| 359 | assert(innum < tx->psbt->num_inputs); |
| 360 | in = &tx->psbt->inputs[innum]; |
| 361 | tal_wally_start(); |
| 362 | wally_psbt_input_set_final_scriptsig(in, script, tal_bytelen(script)); |
| 363 | tal_wally_end(tx->psbt); |
| 364 | } |
| 365 | |
| 366 | /* FIXME: remove */ |
| 367 | void bitcoin_tx_input_get_txid(const struct bitcoin_tx *tx, int innum, |
no test coverage detected