@@ -639,8 +639,8 @@ void notify_log(struct lightningd *ld, const struct log_entry *l)
639
639
notify_send (ld , n );
640
640
}
641
641
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 )
644
644
{
645
645
json_add_string (stream , "plugin_name" , plugin -> shortname );
646
646
json_add_string (stream , "plugin_path" , plugin -> cmd );
@@ -656,27 +656,15 @@ REGISTER_NOTIFICATION(plugin_started);
656
656
void notify_plugin_started (struct lightningd * ld , struct plugin * plugin )
657
657
{
658
658
struct jsonrpc_notification * n = notify_start ("plugin_started" );
659
- plugin_started_notification_serialize (n -> stream , plugin );
659
+ plugin_notification_serialize (n -> stream , plugin );
660
660
notify_send (ld , n );
661
661
}
662
662
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
-
675
663
REGISTER_NOTIFICATION (plugin_stopped );
676
664
677
665
void notify_plugin_stopped (struct lightningd * ld , struct plugin * plugin )
678
666
{
679
667
struct jsonrpc_notification * n = notify_start ("plugin_stopped" );
680
- plugin_stopped_notification_serialize (n -> stream , plugin );
668
+ plugin_notification_serialize (n -> stream , plugin );
681
669
notify_send (ld , n );
682
670
}
0 commit comments