| 380 | } |
| 381 | |
| 382 | void bitcoin_tx_input_set_outpoint(struct bitcoin_tx *tx, int innum, |
| 383 | const struct bitcoin_outpoint *outpoint) |
| 384 | { |
| 385 | struct wally_tx_input *in; |
| 386 | assert(innum < tx->wtx->num_inputs); |
| 387 | |
| 388 | in = &tx->wtx->inputs[innum]; |
| 389 | BUILD_ASSERT(sizeof(struct bitcoin_txid) == sizeof(in->txhash)); |
| 390 | memcpy(in->txhash, &outpoint->txid, sizeof(struct bitcoin_txid)); |
| 391 | in->index = outpoint->n; |
| 392 | } |
| 393 | |
| 394 | /* FIXME: remove */ |
| 395 | void wally_tx_input_get_txid(const struct wally_tx_input *in, |