From 0d2756aea2d8899463a6d0652865354ee125cdcd Mon Sep 17 00:00:00 2001 From: jingwei zhuang Date: Tue, 21 Nov 2023 15:59:00 -0800 Subject: [PATCH] add insecureTLS --- cmd/check_construction.go | 1 + cmd/check_data.go | 1 + cmd/view_balance.go | 1 + cmd/view_block.go | 1 + cmd/view_networks.go | 1 + pkg/tester/construction.go | 1 + 6 files changed, 6 insertions(+) diff --git a/cmd/check_construction.go b/cmd/check_construction.go index 933f5797..dfc66642 100644 --- a/cmd/check_construction.go +++ b/cmd/check_construction.go @@ -81,6 +81,7 @@ func runCheckConstructionCmd(_ *cobra.Command, _ []string) error { fetcher.WithTimeout(time.Duration(Config.HTTPTimeout) * time.Second), fetcher.WithMaxRetries(Config.MaxRetries), fetcher.WithMetaData(metadata), + fetcher.WithInsecureTLS(), } if Config.ForceRetry { fetcherOpts = append(fetcherOpts, fetcher.WithForceRetry()) diff --git a/cmd/check_data.go b/cmd/check_data.go index 535d6c71..d5501258 100644 --- a/cmd/check_data.go +++ b/cmd/check_data.go @@ -87,6 +87,7 @@ func runCheckDataCmd(_ *cobra.Command, _ []string) error { fetcher.WithTimeout(time.Duration(Config.HTTPTimeout) * time.Second), fetcher.WithMaxRetries(Config.MaxRetries), fetcher.WithMetaData(metadata), + fetcher.WithInsecureTLS(), } if Config.ForceRetry { fetcherOpts = append(fetcherOpts, fetcher.WithForceRetry()) diff --git a/cmd/view_balance.go b/cmd/view_balance.go index 72642452..5fc41f6f 100644 --- a/cmd/view_balance.go +++ b/cmd/view_balance.go @@ -61,6 +61,7 @@ func runViewBalanceCmd(cmd *cobra.Command, args []string) error { fetcher.WithRetryElapsedTime(time.Duration(Config.RetryElapsedTime) * time.Second), fetcher.WithTimeout(time.Duration(Config.HTTPTimeout) * time.Second), fetcher.WithMaxRetries(Config.MaxRetries), + fetcher.WithInsecureTLS(), } if Config.ForceRetry { fetcherOpts = append(fetcherOpts, fetcher.WithForceRetry()) diff --git a/cmd/view_block.go b/cmd/view_block.go index 57834c46..2fcfb805 100644 --- a/cmd/view_block.go +++ b/cmd/view_block.go @@ -80,6 +80,7 @@ func runViewBlockCmd(_ *cobra.Command, args []string) error { fetcher.WithRetryElapsedTime(time.Duration(Config.RetryElapsedTime) * time.Second), fetcher.WithTimeout(time.Duration(Config.HTTPTimeout) * time.Second), fetcher.WithMaxRetries(Config.MaxRetries), + fetcher.WithInsecureTLS(), } if Config.ForceRetry { fetcherOpts = append(fetcherOpts, fetcher.WithForceRetry()) diff --git a/cmd/view_networks.go b/cmd/view_networks.go index 375e4db3..8ae28f21 100644 --- a/cmd/view_networks.go +++ b/cmd/view_networks.go @@ -47,6 +47,7 @@ func runViewNetworksCmd(cmd *cobra.Command, args []string) error { fetcher.WithRetryElapsedTime(time.Duration(Config.RetryElapsedTime) * time.Second), fetcher.WithTimeout(time.Duration(Config.HTTPTimeout) * time.Second), fetcher.WithMaxRetries(Config.MaxRetries), + fetcher.WithInsecureTLS(), } if Config.ForceRetry { fetcherOpts = append(fetcherOpts, fetcher.WithForceRetry()) diff --git a/pkg/tester/construction.go b/pkg/tester/construction.go index 9c181388..8f49a73b 100644 --- a/pkg/tester/construction.go +++ b/pkg/tester/construction.go @@ -194,6 +194,7 @@ func InitializeConstruction( fetcher.WithTimeout(time.Duration(config.HTTPTimeout) * time.Second), fetcher.WithMaxRetries(config.MaxRetries), fetcher.WithMetaData(constructionMetadata), + fetcher.WithInsecureTLS(), } if config.Construction.ForceRetry { fetcherOpts = append(fetcherOpts, fetcher.WithForceRetry())