Add public-rpc flag set to true by default (#336)

This commit is contained in:
littleblackcloud 2024-11-17 00:54:53 +01:00 committed by GitHub
parent 49566c2280
commit 0288ad4d01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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",
)
}