Skip to content

Commit d83a169

Browse files
committed
apply readiness check when starting
1 parent 1797e9c commit d83a169

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

rocketpool/node/node.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff 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

shared/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.20.1-dev
1+
1.20.1-dev3

0 commit comments

Comments
 (0)