Browse Source

BOLT: update CSV to latest bolt version.

This removes the WIRE_FINAL_EXPIRY_TOO_SOON which leaked too much info,
and adds the blockheight to WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pull/2938/head
Rusty Russell 5 years ago
committed by Christian Decker
parent
commit
189b2f1313
  1. 6
      channeld/channeld.c
  2. 3
      lightningd/peer_htlcs.c
  3. 2
      wire/extracted_onion_wire_csv

6
channeld/channeld.c

@ -943,11 +943,7 @@ static u8 *make_failmsg(const tal_t *ctx,
case WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS:
assert(failheight);
msg = towire_incorrect_or_unknown_payment_details(
ctx, htlc->amount);
goto done;
case WIRE_FINAL_EXPIRY_TOO_SOON:
assert(failheight);
msg = towire_final_expiry_too_soon(ctx);
ctx, htlc->amount, failheight);
goto done;
case WIRE_FINAL_INCORRECT_CLTV_EXPIRY:
msg = towire_final_incorrect_cltv_expiry(ctx, cltv_expiry);

3
lightningd/peer_htlcs.c

@ -319,8 +319,7 @@ static void handle_localpay(struct htlc_in *hin,
cltv_expiry,
get_block_height(ld->topology),
ld->config.cltv_final);
/* FIXME! */
failcode = WIRE_FINAL_EXPIRY_TOO_SOON;
failcode = WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS;
goto fail;
}

2
wire/extracted_onion_wire_csv

@ -38,7 +38,7 @@ msgdata,expiry_too_soon,len,u16,
msgdata,expiry_too_soon,channel_update,byte,len
msgtype,incorrect_or_unknown_payment_details,PERM|15
msgdata,incorrect_or_unknown_payment_details,htlc_msat,u64,
msgtype,final_expiry_too_soon,17
msgdata,incorrect_or_unknown_payment_details,height,u32,
msgtype,final_incorrect_cltv_expiry,18
msgdata,final_incorrect_cltv_expiry,cltv_expiry,u32,
msgtype,final_incorrect_htlc_amount,19

Loading…
Cancel
Save