| 59 | } |
| 60 | |
| 61 | size_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 | } |
no test coverage detected