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

Function utxo_is_csv_locked

common/utxo.h:72–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static inline bool utxo_is_csv_locked(const struct utxo *utxo, u32 current_height)
73{
74 if (!utxo->close_info)
75 return false;
76 /* BOLT #3:
77 * If `option_anchors` applies to the commitment transaction, the
78 * `to_remote` output is encumbered by a one block csv lock.
79 */
80 if (!utxo->blockheight && utxo->close_info->option_anchors)
81 return true;
82 assert(*utxo->blockheight + utxo->close_info->csv > *utxo->blockheight);
83 return *utxo->blockheight + utxo->close_info->csv > current_height;
84}
85
86/* Estimate of (signed) UTXO weight in transaction */
87size_t utxo_spend_weight(const struct utxo *utxo, size_t min_witness_weight);

Callers 3

wallet_utxo_boostFunction · 0.85
json_addpsbtinputFunction · 0.85
json_utxopsbtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected