Skip to content

Commit 33b4e34

Browse files
authored
chore(taiko-client): corrected printing shasta fork time (#21317)
1 parent e0aeb19 commit 33b4e34

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/taiko-client/pkg/rpc/client.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error) {
152152
}
153153
ctxWithTimeout, cancel := CtxWithTimeoutOrDefault(ctx, DefaultRpcTimeout)
154154
defer cancel()
155+
if err := c.initShastaClients(ctxWithTimeout, cfg); err != nil {
156+
return nil, fmt.Errorf("failed to initialize Shasta clients: %w", err)
157+
}
155158
// Initialize the fork height numbers.
156159
if err := c.initForkHeightConfigs(ctxWithTimeout); err != nil {
157160
return nil, fmt.Errorf("failed to initialize fork height configs: %w", err)
158161
}
159-
if err := c.initShastaClients(ctxWithTimeout, cfg); err != nil {
160-
return nil, fmt.Errorf("failed to initialize Shasta clients: %w", err)
161-
}
162162

163163
// Ensure that the genesis block hash of L1 and L2 match.
164164
if cfg.PacayaInboxAddress != (common.Address{}) {
@@ -298,6 +298,8 @@ func (c *Client) initShastaClients(ctx context.Context, cfg *ClientConfig) error
298298
if v := os.Getenv("TAIKO_INTERNAL_SHASTA_TIME"); v != "" {
299299
if parsed, err := strconv.ParseUint(v, 10, 64); err == nil {
300300
forkTime = parsed
301+
} else {
302+
log.Error("Failed to parse TAIKO_INTERNAL_SHASTA_TIME, using 0", "env", v, "err", err)
301303
}
302304
}
303305
}

0 commit comments

Comments
 (0)