@@ -605,7 +605,8 @@ const u8 *send_htlc_out(const tal_t *ctx,
605
605
u64 groupid ,
606
606
const u8 * onion_routing_packet ,
607
607
struct htlc_in * in ,
608
- struct htlc_out * * houtp )
608
+ struct htlc_out * * houtp ,
609
+ bool endorsed )
609
610
{
610
611
u8 * msg ;
611
612
@@ -646,6 +647,7 @@ const u8 *send_htlc_out(const tal_t *ctx,
646
647
* houtp );
647
648
}
648
649
650
+ // FIXME: add the `endorsed` variable here
649
651
msg = towire_channeld_offer_htlc (out , amount , cltv , payment_hash ,
650
652
onion_routing_packet , blinding );
651
653
subd_req (out -> peer -> ld , out -> owner , take (msg ), -1 , 0 , rcvd_htlc_reply ,
@@ -700,7 +702,8 @@ static void forward_htlc(struct htlc_in *hin,
700
702
const struct short_channel_id * forward_scid ,
701
703
const struct channel_id * forward_to ,
702
704
const u8 next_onion [TOTAL_PACKET_SIZE (ROUTING_INFO_SIZE )],
703
- const struct pubkey * next_blinding )
705
+ const struct pubkey * next_blinding ,
706
+ const bool endorsed )
704
707
{
705
708
const u8 * failmsg ;
706
709
struct lightningd * ld = hin -> key .channel -> peer -> ld ;
@@ -811,7 +814,7 @@ static void forward_htlc(struct htlc_in *hin,
811
814
outgoing_cltv_value , AMOUNT_MSAT (0 ),
812
815
& hin -> payment_hash ,
813
816
next_blinding , 0 /* partid */ , 0 /* groupid */ ,
814
- next_onion , hin , & hout );
817
+ next_onion , hin , & hout , endorsed );
815
818
if (!failmsg )
816
819
return ;
817
820
@@ -1144,7 +1147,7 @@ htlc_accepted_hook_final(struct htlc_accepted_hook_payload *request STEALS)
1144
1147
request -> payload -> forward_channel ,
1145
1148
request -> fwd_channel_id ,
1146
1149
serialize_onionpacket (tmpctx , rs -> next ),
1147
- request -> next_blinding );
1150
+ request -> next_blinding , false /*endorsed*/ );
1148
1151
} else
1149
1152
handle_localpay (hin ,
1150
1153
request -> payload -> amt_to_forward ,
@@ -1184,6 +1187,7 @@ static bool ecdh_maybe_blinding(const struct pubkey *ephemeral_key,
1184
1187
return true;
1185
1188
}
1186
1189
1190
+ // FIXME: this is the way to implement the hook
1187
1191
REGISTER_PLUGIN_HOOK (htlc_accepted ,
1188
1192
htlc_accepted_hook_deserialize ,
1189
1193
htlc_accepted_hook_final ,
0 commit comments