mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd: handle tlv-style payloads.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-changed: JSON API: `htlc_accepted` hook has `type` (currently `legacy` or `tlv`) and other fields directly inside `onion`. Changelog-deprecated: JSON API: `htlc_accepted` hook `per_hop_v0` object deprecated, as is `short_channel_id` for the final hop.
This commit is contained in:
committed by
Christian Decker
parent
b7bbccd6fa
commit
2a2259083a
@@ -826,10 +826,10 @@ bool route_step_decode_end(const struct route_step *rs,
|
||||
case SPHINX_TLV_PAYLOAD:
|
||||
if (!rs->payload.tlv->amt_to_forward)
|
||||
return false;
|
||||
amt_forward->millisatoshis /* Raw: tu64 -> millisatoshis */
|
||||
= rs->payload.tlv->amt_to_forward->amt_to_forward;
|
||||
if (!rs->payload.tlv->outgoing_cltv_value)
|
||||
return false;
|
||||
amt_forward->millisatoshis /* Raw: tu64 -> millisatoshis */
|
||||
= rs->payload.tlv->amt_to_forward->amt_to_forward;
|
||||
*outgoing_cltv = rs->payload.tlv->outgoing_cltv_value->outgoing_cltv_value;
|
||||
return true;
|
||||
case SPHINX_INVALID_PAYLOAD:
|
||||
|
||||
Reference in New Issue
Block a user