| 363 | } |
| 364 | |
| 365 | void bitcoin_tx_input_set_script(struct bitcoin_tx *tx, int innum, u8 *script) |
| 366 | { |
| 367 | struct wally_psbt_input *in; |
| 368 | |
| 369 | tal_wally_start(); |
| 370 | wally_tx_set_input_script(tx->wtx, innum, script, tal_bytelen(script)); |
| 371 | tal_wally_end(tx->wtx); |
| 372 | |
| 373 | /* Also add to the psbt */ |
| 374 | assert(innum < tx->psbt->num_inputs); |
| 375 | in = &tx->psbt->inputs[innum]; |
| 376 | tal_wally_start(); |
| 377 | wally_psbt_input_set_final_scriptsig(in, script, tal_bytelen(script)); |
| 378 | tal_wally_end(tx->psbt); |
| 379 | } |
| 380 | |
| 381 | /* FIXME: remove */ |
| 382 | void bitcoin_tx_input_get_txid(const struct bitcoin_tx *tx, int innum, |
no test coverage detected