@@ -639,8 +639,8 @@ void notify_log(struct lightningd *ld, const struct log_entry *l)
639639 notify_send (ld , n );
640640}
641641
642- static void plugin_started_notification_serialize (struct json_stream * stream ,
643- struct plugin * plugin )
642+ static void plugin_notification_serialize (struct json_stream * stream ,
643+ struct plugin * plugin )
644644{
645645 json_add_string (stream , "plugin_name" , plugin -> shortname );
646646 json_add_string (stream , "plugin_path" , plugin -> cmd );
@@ -656,27 +656,15 @@ REGISTER_NOTIFICATION(plugin_started);
656656void notify_plugin_started (struct lightningd * ld , struct plugin * plugin )
657657{
658658 struct jsonrpc_notification * n = notify_start ("plugin_started" );
659- plugin_started_notification_serialize (n -> stream , plugin );
659+ plugin_notification_serialize (n -> stream , plugin );
660660 notify_send (ld , n );
661661}
662662
663- static void plugin_stopped_notification_serialize (struct json_stream * stream ,
664- struct plugin * plugin )
665- {
666- json_add_string (stream , "plugin_name" , plugin -> shortname );
667- json_add_string (stream , "plugin_path" , plugin -> cmd );
668- json_array_start (stream , "methods" );
669- for (size_t i = 0 ; i < tal_count (plugin -> methods ); i ++ ) {
670- json_add_string (stream , NULL , plugin -> methods [i ]);
671- }
672- json_array_end (stream );
673- }
674-
675663REGISTER_NOTIFICATION (plugin_stopped );
676664
677665void notify_plugin_stopped (struct lightningd * ld , struct plugin * plugin )
678666{
679667 struct jsonrpc_notification * n = notify_start ("plugin_stopped" );
680- plugin_stopped_notification_serialize (n -> stream , plugin );
668+ plugin_notification_serialize (n -> stream , plugin );
681669 notify_send (ld , n );
682670}
0 commit comments