File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,6 +109,35 @@ func run(c *cli.Command) error {
109109 // the daemon waits for the wallet and services to become ready.
110110 startHTTP (ctx , c , cfg )
111111
112+ for {
113+ // Exit if the process received SIGINT/SIGTERM
114+ select {
115+ case <- ctx .Done ():
116+ return ctx .Err ()
117+ default :
118+ }
119+
120+ // Check the EC status
121+ err := services .WaitEthClientSynced (c , false ) // Force refresh the primary / fallback EC status
122+ if err != nil {
123+ if ! sleepWithContext (ctx , taskCooldown ) {
124+ return err
125+ }
126+ continue
127+ }
128+
129+ // Check the BC status
130+ err = services .WaitBeaconClientSynced (c , false ) // Force refresh the primary / fallback BC status
131+ if err != nil {
132+ if ! sleepWithContext (ctx , taskCooldown ) {
133+ return err
134+ }
135+ continue
136+ }
137+
138+ break
139+ }
140+
112141 // Wait until the node wallet stored on disk is registered
113142 if err := services .WaitNodeRegistered (c , true ); err != nil {
114143 return err
Original file line number Diff line number Diff line change 1- 1.20.1-dev
1+ 1.20.1-dev3
You can’t perform that action at this time.
0 commit comments