| 65 | } |
| 66 | |
| 67 | static inline bool utxo_is_csv_locked(const struct utxo *utxo, u32 current_height) |
| 68 | { |
| 69 | if (!utxo->close_info) |
| 70 | return false; |
| 71 | /* All close outputs are csv locked for option_anchor_outputs */ |
| 72 | if (!utxo->blockheight && utxo->close_info->option_anchor_outputs) |
| 73 | return true; |
| 74 | assert(*utxo->blockheight + utxo->close_info->csv > *utxo->blockheight); |
| 75 | return *utxo->blockheight + utxo->close_info->csv > current_height; |
| 76 | } |
| 77 | |
| 78 | void towire_utxo(u8 **pptr, const struct utxo *utxo); |
| 79 | struct utxo *fromwire_utxo(const tal_t *ctx, const u8 **ptr, size_t *max); |