From 0794656f315012778c8d1c5f8daafbb83bb04256 Mon Sep 17 00:00:00 2001 From: josh <josh@elixxir.io> Date: Thu, 23 Sep 2021 12:06:03 -0700 Subject: [PATCH] Add flag for verboseRoundTracking --- README.md | 5 ++++- cmd/root.go | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ebf490f59..cea5fab8b 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ Flags: (default 1) --sendDelay uint The delay between sending the messages in ms (default 500) - --sendid uint Use precanned user id (must be between 1 and + --sendid uiverboseRoundTrackingnt Use precanned user id (must be between 1 and 40, inclusive) --slowPolling bool Enables polling for all network updates and RSA signed rounds. Defaults to true (filtered updates with ECC signed rounds) if not set @@ -190,6 +190,9 @@ Flags: --unsafe-channel-creation Turns off the user identity authenticated channel check, automatically approving authenticated channels + --verboseRoundTracking Verbose round tracking, keeps track and prints + all rounds the client was aware of while running. + Defaults to false if not set. -v, --logLevel uint Level of debugging to print (0 = info, 1 = debug, >1 = trace). (Default info) --waitTimeout uint The number of seconds to wait for messages to diff --git a/cmd/root.go b/cmd/root.go index 853b5a48c..8150d5f36 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -387,7 +387,7 @@ func createClient() *api.Client { netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds") netParams.FastPolling = !viper.GetBool("slowPolling") netParams.ForceMessagePickupRetry = viper.GetBool("forceMessagePickupRetry") - netParams.VerboseRoundTracking = logLevel > 0 + netParams.VerboseRoundTracking = viper.GetBool("verboseRoundTracking") client, err := api.OpenClient(storeDir, []byte(pass), netParams) if err != nil { @@ -415,7 +415,7 @@ func initClient() *api.Client { jww.INFO.Printf("Setting Uncheck Round Period to %v", period) netParams.UncheckRoundPeriod = period } - netParams.VerboseRoundTracking = viper.GetUint("logLevel") > 0 + netParams.VerboseRoundTracking = viper.GetBool("verboseRoundTracking") //load the client client, err := api.Login(storeDir, []byte(pass), netParams) @@ -731,6 +731,11 @@ func init() { "Verbose mode for debugging") viper.BindPFlag("logLevel", rootCmd.PersistentFlags().Lookup("logLevel")) + rootCmd.PersistentFlags().Bool("verboseRoundTracking", false, + "Verbose round tracking, keeps track and prints all rounds the " + + "client was aware of while running. Defaults to false if not set.") + viper.BindPFlag("verboseRoundTracking", rootCmd.PersistentFlags().Lookup("verboseRoundTracking")) + rootCmd.PersistentFlags().StringP("session", "s", "", "Sets the initial storage directory for "+ "client session data") -- GitLab