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

Function utxo_spend_weight

common/utxo.c:61–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61size_t utxo_spend_weight(const struct utxo *utxo, size_t min_witness_weight)
62{
63 size_t wit_weight = bitcoin_tx_simple_input_witness_weight();
64 /* If the min is less than what we'd use for a 'normal' tx,
65 * we return the value with the greater added/calculated */
66 if (wit_weight < min_witness_weight)
67 return bitcoin_tx_input_weight(utxo->is_p2sh,
68 min_witness_weight);
69
70 return bitcoin_tx_input_weight(utxo->is_p2sh, wit_weight);
71}

Callers 2

json_fundpsbtFunction · 0.85
json_utxopsbtFunction · 0.85

Tested by

no test coverage detected