| 2 | #include <common/utxo.h> |
| 3 | |
| 4 | size_t utxo_spend_weight(const struct utxo *utxo, size_t min_witness_weight) |
| 5 | { |
| 6 | size_t witness_weight; |
| 7 | bool p2sh = (utxo->utxotype == UTXO_P2SH_P2WPKH); |
| 8 | |
| 9 | witness_weight = bitcoin_tx_input_witness_weight(utxo->utxotype); |
| 10 | |
| 11 | /* If the min is less than what we'd use for a 'normal' tx, |
| 12 | * we return the value with the greater added/calculated */ |
| 13 | if (witness_weight < min_witness_weight) |
| 14 | return bitcoin_tx_input_weight(p2sh, |
| 15 | min_witness_weight); |
| 16 | |
| 17 | return bitcoin_tx_input_weight(p2sh, witness_weight); |
| 18 | } |
| 19 | |
| 20 | u32 utxo_is_immature(const struct utxo *utxo, u32 blockheight) |
| 21 | { |
no test coverage detected