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

Function bitcoin_tx_input_set_script

bitcoin/tx.c:365–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365void 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 */
382void 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