Skip to content
Snippets Groups Projects
Commit efcd42de authored by Josh Brooks's avatar Josh Brooks
Browse files

Make fast polling a configurable option

parent 5b5674b8
No related branches found
No related tags found
1 merge request!23Release
...@@ -160,6 +160,8 @@ Flags: ...@@ -160,6 +160,8 @@ Flags:
base64 representations) (default "0") base64 representations) (default "0")
--forceHistoricalRounds Force all rounds to be sent to historical --forceHistoricalRounds Force all rounds to be sent to historical
round retrieval round retrieval
--fastPolling bool Enables polling for filtered network updates.
Defaults to true if not set
-h, --help help for client -h, --help help for client
-l, --log string Path to the log output path (- is stdout) -l, --log string Path to the log output path (- is stdout)
(default "-") (default "-")
......
...@@ -309,6 +309,7 @@ func createClient() *api.Client { ...@@ -309,6 +309,7 @@ func createClient() *api.Client {
netParams.E2EParams.NumRekeys = uint16( netParams.E2EParams.NumRekeys = uint16(
viper.GetUint("e2eNumReKeys")) viper.GetUint("e2eNumReKeys"))
netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds") netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds")
netParams.FastPolling = viper.GetBool("fastPolling")
client, err := api.OpenClient(storeDir, []byte(pass), netParams) client, err := api.OpenClient(storeDir, []byte(pass), netParams)
if err != nil { if err != nil {
...@@ -329,6 +330,7 @@ func initClient() *api.Client { ...@@ -329,6 +330,7 @@ func initClient() *api.Client {
netParams.E2EParams.NumRekeys = uint16( netParams.E2EParams.NumRekeys = uint16(
viper.GetUint("e2eNumReKeys")) viper.GetUint("e2eNumReKeys"))
netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds") netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds")
netParams.FastPolling = viper.GetBool("fastPolling")
//load the client //load the client
client, err := api.Login(storeDir, []byte(pass), netParams) client, err := api.Login(storeDir, []byte(pass), netParams)
...@@ -722,6 +724,12 @@ func init() { ...@@ -722,6 +724,12 @@ func init() {
viper.BindPFlag("forceHistoricalRounds", viper.BindPFlag("forceHistoricalRounds",
rootCmd.Flags().Lookup("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 // E2E Params
defaultE2EParams := params.GetDefaultE2ESessionParams() defaultE2EParams := params.GetDefaultE2ESessionParams()
rootCmd.Flags().UintP("e2eMinKeys", rootCmd.Flags().UintP("e2eMinKeys",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment