File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ enum channel_add_err channel_add_htlc(struct channel *channel,
227
227
enum side sender ,
228
228
u64 id ,
229
229
u64 msatoshi ,
230
- u32 expiry ,
230
+ u32 cltv_expiry ,
231
231
const struct sha256 * payment_hash ,
232
232
const u8 routing [1254 ])
233
233
{
@@ -248,7 +248,12 @@ enum channel_add_err channel_add_htlc(struct channel *channel,
248
248
htlc -> state = RCVD_ADD_HTLC ;
249
249
htlc -> id = id ;
250
250
htlc -> msatoshi = msatoshi ;
251
- if (!blocks_to_abs_locktime (expiry , & htlc -> expiry ))
251
+ /* BOLT #2:
252
+ *
253
+ * A receiving node SHOULD fail the channel if a sending node... sets
254
+ * `cltv-expiry` to greater or equal to 500000000.
255
+ */
256
+ if (!blocks_to_abs_locktime (cltv_expiry , & htlc -> expiry ))
252
257
return CHANNEL_ERR_INVALID_EXPIRY ;
253
258
htlc -> rhash = * payment_hash ;
254
259
htlc -> r = NULL ;
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ enum channel_add_err {
207
207
* @offerer: the side offering the HTLC (to the other side).
208
208
* @id: unique HTLC id.
209
209
* @msatoshi: amount in millisatoshi.
210
- * @expiry : block number when HTLC can no longer be redeemed.
210
+ * @cltv_expiry : block number when HTLC can no longer be redeemed.
211
211
* @payment_hash: hash whose preimage can redeem HTLC.
212
212
* @routing: routing information (copied)
213
213
*
@@ -219,7 +219,7 @@ enum channel_add_err channel_add_htlc(struct channel *channel,
219
219
enum side sender ,
220
220
u64 id ,
221
221
u64 msatoshi ,
222
- u32 expiry ,
222
+ u32 cltv_expiry ,
223
223
const struct sha256 * payment_hash ,
224
224
const u8 routing [1254 ]);
225
225
You can’t perform that action at this time.
0 commit comments