FIXME Stolen from psbt_append_input; export? */
| 196 | |
| 197 | /* FIXME Stolen from psbt_append_input; export? */ |
| 198 | static struct wally_tx_input *wally_tx_input_from_outpoint_sequence(const struct bitcoin_outpoint *outpoint, |
| 199 | u32 sequence) |
| 200 | { |
| 201 | struct wally_tx_input *tx_in; |
| 202 | if (chainparams->is_elements) { |
| 203 | if (wally_tx_elements_input_init_alloc(outpoint->txid.shad.sha.u.u8, |
| 204 | sizeof(outpoint->txid.shad.sha.u.u8), |
| 205 | outpoint->n, |
| 206 | sequence, NULL, 0, |
| 207 | NULL, |
| 208 | NULL, 0, |
| 209 | NULL, 0, NULL, 0, |
| 210 | NULL, 0, NULL, 0, |
| 211 | NULL, 0, NULL, |
| 212 | &tx_in) != WALLY_OK) |
| 213 | abort(); |
| 214 | } else { |
| 215 | if (wally_tx_input_init_alloc(outpoint->txid.shad.sha.u.u8, |
| 216 | sizeof(outpoint->txid.shad.sha.u.u8), |
| 217 | outpoint->n, |
| 218 | sequence, NULL, 0, NULL, |
| 219 | &tx_in) != WALLY_OK) |
| 220 | abort(); |
| 221 | } |
| 222 | return tx_in; |
| 223 | } |
| 224 | |
| 225 | int bitcoin_tx_add_input(struct bitcoin_tx *tx, |
| 226 | const struct bitcoin_outpoint *outpoint, |
no test coverage detected