@@ -861,6 +861,7 @@ static void opening_got_offer(struct subd *openingd,
861861struct onfunding_channel_tx_hook_payload {
862862 struct subd * openingd ;
863863 struct bitcoin_tx * tx ;
864+ struct channel_id * cid ;
864865};
865866
866867static void onfunding_channel_tx_hook_final (struct onfunding_channel_tx_hook_payload * payload STEALS )
@@ -875,8 +876,13 @@ static void onfunding_channel_tx_hook_serialize(struct onfunding_channel_tx_hook
875876 struct json_stream * stream ,
876877 struct plugin * plugin )
877878{
879+ struct bitcoin_txid txid ;
880+
881+ bitcoin_txid (payload -> tx , & txid );
878882 json_object_start (stream , "onfunding_channel_tx" );
879883 json_add_tx (stream , "tx" , payload -> tx );
884+ json_add_txid (stream , "txid" , & txid );
885+ json_add_channel_id (stream , "channel_id" , payload -> cid );
880886 json_object_end (stream );
881887}
882888
@@ -918,7 +924,7 @@ static char *opening_on_funding_tx(struct subd *openingd, const u8 *msg)
918924 payload = tal (openingd , struct onfunding_channel_tx_hook_payload );
919925 payload -> openingd = openingd ;
920926
921- if (!fromwire_openingd_on_funding_tx (msg , msg , & payload -> tx ))
927+ if (!fromwire_openingd_on_funding_tx (msg , msg , & payload -> tx , payload -> cid ))
922928 return tal_fmt (tmpctx , "Unexpected encoding of openingd_on_funding_tx msg: %s" ,
923929 tal_hex (tmpctx , msg ));
924930 assert (plugin_hook_call_onfunding_channel_tx (openingd -> ld , NULL , payload ));
0 commit comments