From 0288ad4d0192a82bc031064a77ab726cfe995b90 Mon Sep 17 00:00:00 2001 From: littleblackcloud <163544315+littleblackcloud@users.noreply.github.com> Date: Sun, 17 Nov 2024 00:54:53 +0100 Subject: [PATCH] Add public-rpc flag set to true by default (#336) --- client/cmd/root.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/cmd/root.go b/client/cmd/root.go index b8db6a2..f443434 100644 --- a/client/cmd/root.go +++ b/client/cmd/root.go @@ -26,6 +26,7 @@ var NodeConfig *config.Config var simulateFail bool var LightNode bool = false var DryRun bool = false +var publicRPC bool = true var rootCmd = &cobra.Command{ Use: "qclient", @@ -109,7 +110,7 @@ var rootCmd = &cobra.Command{ os.Exit(1) } - if NodeConfig.ListenGRPCMultiaddr == "" { + if publicRPC { fmt.Println("gRPC not enabled, using light node") LightNode = true } @@ -184,4 +185,10 @@ func init() { signatureCheckDefault(), "bypass signature check (not recommended for binaries) (default true or value of QUILIBRIUM_SIGNATURE_CHECK env var)", ) + rootCmd.PersistentFlags().BoolVar( + &publicRPC, + "public-rpc", + true, + "uses the public RPC", + ) }