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

Function uses_witness

bitcoin/tx.c:424–433  ·  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

422/* BIP144:
423 * If the witness is empty, the old serialization format should be used. */
424static bool uses_witness(const struct wally_tx *wtx)
425{
426 size_t i;
427
428 for (i = 0; i < wtx->num_inputs; i++) {
429 if (wtx->inputs[i].witness)
430 return true;
431 }
432 return false;
433}
434
435u8 *linearize_tx(const tal_t *ctx, const struct bitcoin_tx *tx)
436{

Callers 1

linearize_wtxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected