diff --git a/README.md b/README.md index 98a8c6b0b888063c9ffd447641f55a0d5339a191..b5d507f4715e9faba43a9763ce2ba9eb733c0b44 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,8 @@ Flags: base64 representations) (default "0") --forceHistoricalRounds Force all rounds to be sent to historical round retrieval + --fastPolling bool Enables polling for filtered network updates. + Defaults to true if not set -h, --help help for client -l, --log string Path to the log output path (- is stdout) (default "-") diff --git a/cmd/root.go b/cmd/root.go index 95dc23912205d8217ba97fb45a2465743f7ed28c..391333e2d6ca69df25470a2ec274e488857656a5 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -309,6 +309,7 @@ func createClient() *api.Client { netParams.E2EParams.NumRekeys = uint16( viper.GetUint("e2eNumReKeys")) netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds") + netParams.FastPolling = viper.GetBool("fastPolling") client, err := api.OpenClient(storeDir, []byte(pass), netParams) if err != nil { @@ -329,6 +330,7 @@ func initClient() *api.Client { netParams.E2EParams.NumRekeys = uint16( viper.GetUint("e2eNumReKeys")) netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds") + netParams.FastPolling = viper.GetBool("fastPolling") //load the client client, err := api.Login(storeDir, []byte(pass), netParams) @@ -722,6 +724,12 @@ func init() { viper.BindPFlag("forceHistoricalRounds", rootCmd.Flags().Lookup("forceHistoricalRounds")) + // Network params + rootCmd.Flags().BoolP("fastPolling", "", true, + "Enables polling for filtered network updates") + viper.BindPFlag("fastPolling", + rootCmd.Flags().Lookup("fastPolling")) + // E2E Params defaultE2EParams := params.GetDefaultE2ESessionParams() rootCmd.Flags().UintP("e2eMinKeys",