@@ -863,6 +863,7 @@ static void opening_got_offer(struct subd *openingd,
863863struct onfunding_channel_tx_hook_payload {
864864 struct subd * openingd ;
865865 struct bitcoin_tx * tx ;
866+ struct channel_id * cid ;
866867};
867868
868869static void onfunding_channel_tx_hook_final (struct onfunding_channel_tx_hook_payload * payload STEALS )
@@ -877,8 +878,13 @@ static void onfunding_channel_tx_hook_serialize(struct onfunding_channel_tx_hook
877878 struct json_stream * stream ,
878879 struct plugin * plugin )
879880{
881+ struct bitcoin_txid txid ;
882+
883+ bitcoin_txid (payload -> tx , & txid );
880884 json_object_start (stream , "onfunding_channel_tx" );
881885 json_add_tx (stream , "tx" , payload -> tx );
886+ json_add_txid (stream , "txid" , & txid );
887+ json_add_channel_id (stream , "channel_id" , payload -> cid );
882888 json_object_end (stream );
883889}
884890
@@ -920,7 +926,7 @@ static char *opening_on_funding_tx(struct subd *openingd, const u8 *msg)
920926 payload = tal (openingd , struct onfunding_channel_tx_hook_payload );
921927 payload -> openingd = openingd ;
922928
923- if (!fromwire_openingd_on_funding_tx (msg , msg , & payload -> tx ))
929+ if (!fromwire_openingd_on_funding_tx (msg , msg , & payload -> tx , payload -> cid ))
924930 return tal_fmt (tmpctx , "Unexpected encoding of openingd_on_funding_tx msg: %s" ,
925931 tal_hex (tmpctx , msg ));
926932 assert (plugin_hook_call_onfunding_channel_tx (openingd -> ld , NULL , payload ));
0 commit comments