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

Function uses_witness

bitcoin/tx.c:412–421  ·  view source on GitHub ↗

BIP144: * If the witness is empty, the old serialization format should be used. */

Source from the content-addressed store, hash-verified

410/* BIP144:
411 * If the witness is empty, the old serialization format should be used. */
412static bool uses_witness(const struct wally_tx *wtx)
413{
414 size_t i;
415
416 for (i = 0; i < wtx->num_inputs; i++) {
417 if (wtx->inputs[i].witness)
418 return true;
419 }
420 return false;
421}
422
423u8 *linearize_tx(const tal_t *ctx, const struct bitcoin_tx *tx)
424{

Callers 1

linearize_wtxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected