From a3b144986083e1e5aa4a6bed96bc9dc77e623c46 Mon Sep 17 00:00:00 2001 From: josh <josh@elixxir.io> Date: Wed, 25 May 2022 15:28:30 -0700 Subject: [PATCH] Final clean up --- api/params_test.go | 1 - auth/params.go | 19 +++++++++---------- cmix/params.go | 2 ++ cmix/pickup/params.go | 1 + e2e/rekey/params_test.go | 1 - 5 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 api/params_test.go delete mode 100644 e2e/rekey/params_test.go diff --git a/api/params_test.go b/api/params_test.go deleted file mode 100644 index 778f64ec1..000000000 --- a/api/params_test.go +++ /dev/null @@ -1 +0,0 @@ -package api diff --git a/auth/params.go b/auth/params.go index 946f4ea05..907fa4ad8 100644 --- a/auth/params.go +++ b/auth/params.go @@ -7,8 +7,16 @@ import ( // Params is are the parameters for the auth package. type Params struct { - ReplayRequests bool + ReplayRequests bool + RequestTag string + ConfirmTag string + ResetRequestTag string + ResetConfirmTag string +} +// paramsDisk will be the marshal-able and umarshal-able object. +type paramsDisk struct { + ReplayRequests bool RequestTag string ConfirmTag string ResetRequestTag string @@ -48,15 +56,6 @@ func GetDefaultTemporaryParams() Params { return p } -// paramsDisk will be the marshal-able and umarshal-able object. -type paramsDisk struct { - ReplayRequests bool - RequestTag string - ConfirmTag string - ResetRequestTag string - ResetConfirmTag string -} - // MarshalJSON adheres to the json.Marshaler interface. func (p Params) MarshalJSON() ([]byte, error) { pDisk := paramsDisk{ diff --git a/cmix/params.go b/cmix/params.go index 23f8d7d6a..d8aa778b1 100644 --- a/cmix/params.go +++ b/cmix/params.go @@ -282,6 +282,8 @@ func (p *CMIXParams) UnmarshalJSON(data []byte) error { return nil } +// NodeMap represents a map of nodes and whether they have been +// blacklisted. This is designed for use with CMIXParams.BlacklistedNodes type NodeMap map[id.ID]bool // MarshalJSON adheres to the json.Marshaler interface. diff --git a/cmix/pickup/params.go b/cmix/pickup/params.go index 9edf0f029..99ec4cb83 100644 --- a/cmix/pickup/params.go +++ b/cmix/pickup/params.go @@ -54,6 +54,7 @@ type paramsDisk struct { ForceHistoricalRounds bool } +// GetDefaultParams returns a default set of Params. func GetDefaultParams() Params { return Params{ NumMessageRetrievalWorkers: 8, diff --git a/e2e/rekey/params_test.go b/e2e/rekey/params_test.go deleted file mode 100644 index b1749f6de..000000000 --- a/e2e/rekey/params_test.go +++ /dev/null @@ -1 +0,0 @@ -package rekey -- GitLab