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

Function bitcoin_tx_input_set_script

bitcoin/tx.c:350–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350void 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 */
367void bitcoin_tx_input_get_txid(const struct bitcoin_tx *tx, int innum,

Callers 1

mainFunction · 0.85

Calls 3

tal_wally_startFunction · 0.85
tal_bytelenFunction · 0.85
tal_wally_endFunction · 0.85

Tested by

no test coverage detected