@@ -605,7 +605,8 @@ const u8 *send_htlc_out(const tal_t *ctx,
605605 u64 groupid ,
606606 const u8 * onion_routing_packet ,
607607 struct htlc_in * in ,
608- struct htlc_out * * houtp )
608+ struct htlc_out * * houtp ,
609+ bool endorsed )
609610{
610611 u8 * msg ;
611612
@@ -646,6 +647,7 @@ const u8 *send_htlc_out(const tal_t *ctx,
646647 * houtp );
647648 }
648649
650+ // FIXME: add the `endorsed` variable here
649651 msg = towire_channeld_offer_htlc (out , amount , cltv , payment_hash ,
650652 onion_routing_packet , blinding );
651653 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,
700702 const struct short_channel_id * forward_scid ,
701703 const struct channel_id * forward_to ,
702704 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 )
704707{
705708 const u8 * failmsg ;
706709 struct lightningd * ld = hin -> key .channel -> peer -> ld ;
@@ -811,7 +814,7 @@ static void forward_htlc(struct htlc_in *hin,
811814 outgoing_cltv_value , AMOUNT_MSAT (0 ),
812815 & hin -> payment_hash ,
813816 next_blinding , 0 /* partid */ , 0 /* groupid */ ,
814- next_onion , hin , & hout );
817+ next_onion , hin , & hout , endorsed );
815818 if (!failmsg )
816819 return ;
817820
@@ -1144,7 +1147,7 @@ htlc_accepted_hook_final(struct htlc_accepted_hook_payload *request STEALS)
11441147 request -> payload -> forward_channel ,
11451148 request -> fwd_channel_id ,
11461149 serialize_onionpacket (tmpctx , rs -> next ),
1147- request -> next_blinding );
1150+ request -> next_blinding , false /*endorsed*/ );
11481151 } else
11491152 handle_localpay (hin ,
11501153 request -> payload -> amt_to_forward ,
@@ -1184,6 +1187,7 @@ static bool ecdh_maybe_blinding(const struct pubkey *ephemeral_key,
11841187 return true;
11851188}
11861189
1190+ // FIXME: this is the way to implement the hook
11871191REGISTER_PLUGIN_HOOK (htlc_accepted ,
11881192 htlc_accepted_hook_deserialize ,
11891193 htlc_accepted_hook_final ,
0 commit comments