From fdd7772e40fa924140b0a789d679030c4753e898 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Tue, 31 Oct 2023 14:16:03 -0400 Subject: [PATCH] Fixed `newReaderNodeBootstrapper` to return `nil` bootstrapper if bootstrap URL is "" --- cmd/fireeth/reader_node_bootstraper.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/fireeth/reader_node_bootstraper.go b/cmd/fireeth/reader_node_bootstraper.go index 52017e2a..e008421b 100644 --- a/cmd/fireeth/reader_node_bootstraper.go +++ b/cmd/fireeth/reader_node_bootstraper.go @@ -20,9 +20,13 @@ import ( "go.uber.org/zap" ) -func newReaderNodeBootstrapper(ctx context.Context, logger *zap.Logger, cmd *cobra.Command, resolvedNodeArguments []string, resolver firecore.ReaderNodeArgumentResolver) (operator.Bootstrapper, error) { - nodePath := sflags.MustGetString(cmd, "reader-node-path") +func newReaderNodeBootstrapper(_ context.Context, logger *zap.Logger, cmd *cobra.Command, resolvedNodeArguments []string, resolver firecore.ReaderNodeArgumentResolver) (operator.Bootstrapper, error) { bootstrapDataURL := sflags.MustGetString(cmd, "reader-node-bootstrap-data-url") + if bootstrapDataURL == "" { + return nil, nil + } + + nodePath := sflags.MustGetString(cmd, "reader-node-path") nodeDataDir := resolver("{node-data-dir}") switch {