MCPcopy Create free account
hub / github.com/ElementsProject/lightning / wally_tx_input_from_outpoint_sequence

Function wally_tx_input_from_outpoint_sequence

bitcoin/tx.c:198–223  ·  view source on GitHub ↗

FIXME Stolen from psbt_append_input; export? */

Source from the content-addressed store, hash-verified

196
197/* FIXME Stolen from psbt_append_input; export? */
198static 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
225int bitcoin_tx_add_input(struct bitcoin_tx *tx,
226 const struct bitcoin_outpoint *outpoint,

Callers 1

bitcoin_tx_add_inputFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected