@@ -678,8 +678,8 @@ void notify_log(struct lightningd *ld, const struct log_entry *l)
678678 notify_send (ld , n );
679679}
680680
681- static void plugin_started_notification_serialize (struct json_stream * stream ,
682- struct plugin * plugin )
681+ static void plugin_notification_serialize (struct json_stream * stream ,
682+ struct plugin * plugin )
683683{
684684 json_add_string (stream , "plugin_name" , plugin -> shortname );
685685 json_add_string (stream , "plugin_path" , plugin -> cmd );
@@ -695,27 +695,15 @@ REGISTER_NOTIFICATION(plugin_started);
695695void notify_plugin_started (struct lightningd * ld , struct plugin * plugin )
696696{
697697 struct jsonrpc_notification * n = notify_start ("plugin_started" );
698- plugin_started_notification_serialize (n -> stream , plugin );
698+ plugin_notification_serialize (n -> stream , plugin );
699699 notify_send (ld , n );
700700}
701701
702- static void plugin_stopped_notification_serialize (struct json_stream * stream ,
703- struct plugin * plugin )
704- {
705- json_add_string (stream , "plugin_name" , plugin -> shortname );
706- json_add_string (stream , "plugin_path" , plugin -> cmd );
707- json_array_start (stream , "methods" );
708- for (size_t i = 0 ; i < tal_count (plugin -> methods ); i ++ ) {
709- json_add_string (stream , NULL , plugin -> methods [i ]);
710- }
711- json_array_end (stream );
712- }
713-
714702REGISTER_NOTIFICATION (plugin_stopped );
715703
716704void notify_plugin_stopped (struct lightningd * ld , struct plugin * plugin )
717705{
718706 struct jsonrpc_notification * n = notify_start ("plugin_stopped" );
719- plugin_stopped_notification_serialize (n -> stream , plugin );
707+ plugin_notification_serialize (n -> stream , plugin );
720708 notify_send (ld , n );
721709}
0 commit comments