File tree 2 files changed +35
-1
lines changed
2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -978,10 +978,19 @@ let run ~data_dir ~configuration_override =
978
978
979
979
let cctxt = Rpc_context. make endpoint in
980
980
let * dal_config = fetch_dal_config cctxt in
981
+ let points = points @ dal_config.bootstrap_peers in
982
+ let *! () =
983
+ if points = [] then Event. (emit config_error_no_bootstrap) ()
984
+ else Lwt. return_unit
985
+ in
981
986
(* Resolve:
982
987
- [points] from DAL node config file and CLI.
983
988
- [dal_config.bootstrap_peers] from the L1 network config. *)
984
- let * points = resolve (points @ dal_config.bootstrap_peers) in
989
+ let * points = resolve points in
990
+ let *! () =
991
+ if points = [] then Event. (emit resolved_bootstrap_no_points) ()
992
+ else Event. (emit resolved_bootstrap_points (List. length points))
993
+ in
985
994
(* Create and start a GS worker *)
986
995
let gs_worker =
987
996
let rng =
Original file line number Diff line number Diff line change @@ -107,6 +107,31 @@ let retry_fetching_node_config_notice =
107
107
let retry_fetching_node_config_warning =
108
108
retry_fetching_node_config Internal_event. Warning " warning"
109
109
110
+ let config_error_no_bootstrap =
111
+ declare_0
112
+ ~section
113
+ ~name: " config_error_no_bootstrap"
114
+ ~msg:
115
+ " no bootstrap peers found in the configuration file or network settings"
116
+ ~level: Error
117
+ ()
118
+
119
+ let resolved_bootstrap_no_points =
120
+ declare_0
121
+ ~section
122
+ ~name: " resolved_bootstrap_no_points"
123
+ ~msg: " no bootstrap points could be resolved"
124
+ ~level: Error
125
+ ()
126
+
127
+ let resolved_bootstrap_points =
128
+ declare_1
129
+ ~section
130
+ ~name: " resolved_bootstrap_points"
131
+ ~msg: " resolved {number} bootstrap points"
132
+ ~level: Notice
133
+ (" number" , Data_encoding. int31)
134
+
110
135
let fetched_config_success =
111
136
declare_1
112
137
~section
You can’t perform that action at this time.
0 commit comments