diff --git a/cmd/broadcast.go b/cmd/broadcast.go index 8b9ae2358d5e4b6b51d2dd15bc6b6e22e74e5c05..262a5b2ab278839e91ae349905f737bc6da2bb26 100644 --- a/cmd/broadcast.go +++ b/cmd/broadcast.go @@ -2,6 +2,9 @@ package cmd import ( "fmt" + "os" + "time" + "github.com/spf13/cobra" jww "github.com/spf13/jwalterweatherman" "github.com/spf13/viper" @@ -12,8 +15,6 @@ import ( crypto "gitlab.com/elixxir/crypto/broadcast" "gitlab.com/xx_network/crypto/signature/rsa" "gitlab.com/xx_network/primitives/utils" - "os" - "time" ) // singleCmd is the single-use subcommand that allows for sending and responding @@ -23,7 +24,8 @@ var broadcastCmd = &cobra.Command{ Short: "Send broadcast messages", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { - client := initClient() + cmixParams, e2eParams := initParams() + client := initClient(cmixParams, e2eParams) // Write user contact to file user := client.GetUser() diff --git a/cmd/callbacks.go b/cmd/callbacks.go index d5d75a321f7e215062738184bbaab954812c29b6..4be99e0d0b6c7521d34cdd4cfa7e9ac90a763dbe 100644 --- a/cmd/callbacks.go +++ b/cmd/callbacks.go @@ -10,6 +10,7 @@ package cmd import ( "fmt" + "github.com/spf13/viper" "gitlab.com/elixxir/client/xxdk" @@ -26,12 +27,14 @@ import ( type authCallbacks struct { autoConfirm bool confCh chan *id.ID + params xxdk.E2EParams } -func makeAuthCallbacks(autoConfirm bool) *authCallbacks { +func makeAuthCallbacks(autoConfirm bool, params xxdk.E2EParams) *authCallbacks { return &authCallbacks{ autoConfirm: autoConfirm, confCh: make(chan *id.ID, 10), + params: params, } } @@ -46,7 +49,7 @@ func (a *authCallbacks) Request(requestor contact.Contact, jww.INFO.Printf("Channel Request: %s", requestor.ID) if viper.GetBool("verify-sends") { // Verify message sends were successful - acceptChannelVerified(client, requestor.ID) + acceptChannelVerified(client, requestor.ID, a.params) } else { acceptChannel(client, requestor.ID) } diff --git a/cmd/fileTransfer.go b/cmd/fileTransfer.go index bdafb1edf63440c3f1109516f687a66ba2778b37..fe5ac973d5c133c66c2935824bcbfb470f57fa44 100644 --- a/cmd/fileTransfer.go +++ b/cmd/fileTransfer.go @@ -9,10 +9,11 @@ package cmd import ( "fmt" - "gitlab.com/elixxir/client/xxdk" "io/ioutil" "time" + "gitlab.com/elixxir/client/xxdk" + "github.com/spf13/cobra" jww "github.com/spf13/jwalterweatherman" "github.com/spf13/viper" @@ -34,9 +35,8 @@ var ftCmd = &cobra.Command{ Short: "Send and receive file for cMix client", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { - - // Initialise a new client - client := initClient() + cmixParams, e2eParams := initParams() + client := initClient(cmixParams, e2eParams) // Print user's reception ID and save contact file user := client.GetUser() diff --git a/cmd/group.go b/cmd/group.go index 8ea7fd73870ec504605674be1f3c2817412abe75..8c537daf44e57c64db3f49652babfbd54c53052e 100644 --- a/cmd/group.go +++ b/cmd/group.go @@ -12,12 +12,13 @@ package cmd import ( "bufio" "fmt" + "os" + "time" + "gitlab.com/elixxir/client/cmix/identity/receptionID" "gitlab.com/elixxir/client/cmix/rounds" "gitlab.com/elixxir/client/xxdk" "gitlab.com/elixxir/primitives/format" - "os" - "time" "github.com/spf13/cobra" jww "github.com/spf13/jwalterweatherman" @@ -33,8 +34,8 @@ var groupCmd = &cobra.Command{ Short: "Group commands for cMix client", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { - - client := initClient() + cmixParams, e2eParams := initParams() + client := initClient(cmixParams, e2eParams) // Print user's reception ID user := client.GetUser() diff --git a/cmd/root.go b/cmd/root.go index 0f0a42ad98fddb2791e659930573a752f639e555..696fd672adc7332e602d0aa60f99876f59674ba6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -28,7 +28,6 @@ import ( "gitlab.com/elixxir/client/storage/user" "gitlab.com/elixxir/client/backup" - "gitlab.com/elixxir/client/e2e" "gitlab.com/elixxir/client/xxdk" "gitlab.com/elixxir/client/catalog" @@ -194,7 +193,9 @@ var rootCmd = &cobra.Command{ pprof.StartCPUProfile(f) } - client := initClient() + cmixParams, e2eParams := initParams() + + client := initClient(cmixParams, e2eParams) jww.INFO.Printf("Client Initialized...") @@ -276,12 +277,12 @@ var rootCmd = &cobra.Command{ // Accept auth request for this recipient authConfirmed := false - paramsE2E := e2e.GetDefaultParams() if viper.GetBool("accept-channel") { // Verify that the confirmation message makes it to the // original sender if viper.GetBool("verify-sends") { - acceptChannelVerified(client, recipientID) + acceptChannelVerified(client, recipientID, + e2eParams) } else { // Accept channel, agnostic of round result acceptChannel(client, recipientID) @@ -304,7 +305,7 @@ var rootCmd = &cobra.Command{ if !unsafe && !authConfirmed && !isPrecanPartner && sendAuthReq { addAuthenticatedChannel(client, recipientID, - recipientContact) + recipientContact, e2eParams) } else if !unsafe && !authConfirmed && isPrecanPartner { addPrecanAuthenticatedChannel(client, recipientID, recipientContact) @@ -313,7 +314,7 @@ var rootCmd = &cobra.Command{ sendAuthReq { jww.WARN.Printf("Resetting negotiated auth channel") resetAuthenticatedChannel(client, recipientID, - recipientContact) + recipientContact, e2eParams) authConfirmed = false } @@ -386,10 +387,6 @@ var rootCmd = &cobra.Command{ payload := []byte(msgBody) recipient := recipientID - if viper.GetBool("splitSends") { - paramsE2E.ExcludedRounds = excludedRounds.NewSet() - } - jww.INFO.Printf("Client Sending messages...") wg := &sync.WaitGroup{} @@ -405,14 +402,14 @@ var rootCmd = &cobra.Command{ // Send messages var roundIDs []id.Round if unsafe { - paramsE2E.CMIXParams.DebugTag = "cmd.Unsafe" + e2eParams.Base.DebugTag = "cmd.Unsafe" roundIDs, _, err = client.GetE2E().SendUnsafe( mt, recipient, payload, - paramsE2E) + e2eParams.Base) } else { - paramsE2E.CMIXParams.DebugTag = "cmd.E2E" + e2eParams.Base.DebugTag = "cmd.E2E" roundIDs, _, _, err = client.GetE2E().SendE2E(mt, - recipient, payload, paramsE2E) + recipient, payload, e2eParams.Base) } if err != nil { jww.FATAL.Panicf("%+v", err) @@ -436,7 +433,7 @@ var rootCmd = &cobra.Command{ } // Monitor rounds for results - err = client.GetCmix().GetRoundResults(paramsE2E.CMIXParams.Timeout, f, roundIDs...) + err = client.GetCmix().GetRoundResults(e2eParams.Base.Timeout, f, roundIDs...) if err != nil { jww.DEBUG.Printf("Could not verify messages were sent successfully, resending messages...") continue @@ -624,54 +621,58 @@ func createClient() *xxdk.Cmix { } } - params := initParams() + cmixParams, _ := initParams() - client, err := xxdk.OpenCmix(storeDir, pass, params) + client, err := xxdk.OpenCmix(storeDir, pass, cmixParams) if err != nil { jww.FATAL.Panicf("%+v", err) } return client } -func initParams() xxdk.Params { - p := xxdk.GetDefaultParams() - p.Session.MinKeys = uint16(viper.GetUint("e2eMinKeys")) - p.Session.MaxKeys = uint16(viper.GetUint("e2eMaxKeys")) - p.Session.NumRekeys = uint16(viper.GetUint("e2eNumReKeys")) - p.Session.RekeyThreshold = viper.GetFloat64("e2eRekeyThreshold") - p.CMix.Pickup.ForceHistoricalRounds = viper.GetBool( +func initParams() (xxdk.CMIXParams, xxdk.E2EParams) { + e2eParams := xxdk.GetDefaultE2EParams() + e2eParams.Session.MinKeys = uint16(viper.GetUint("e2eMinKeys")) + e2eParams.Session.MaxKeys = uint16(viper.GetUint("e2eMaxKeys")) + e2eParams.Session.NumRekeys = uint16(viper.GetUint("e2eNumReKeys")) + e2eParams.Session.RekeyThreshold = viper.GetFloat64("e2eRekeyThreshold") + + if viper.GetBool("splitSends") { + e2eParams.Base.ExcludedRounds = excludedRounds.NewSet() + } + + cmixParams := xxdk.GetDefaultCMixParams() + cmixParams.Network.Pickup.ForceHistoricalRounds = viper.GetBool( "forceHistoricalRounds") - p.CMix.FastPolling = !viper.GetBool("slowPolling") - p.CMix.Pickup.ForceMessagePickupRetry = viper.GetBool( + cmixParams.Network.FastPolling = !viper.GetBool("slowPolling") + cmixParams.Network.Pickup.ForceMessagePickupRetry = viper.GetBool( "forceMessagePickupRetry") - if p.CMix.Pickup.ForceMessagePickupRetry { + if cmixParams.Network.Pickup.ForceMessagePickupRetry { period := 3 * time.Second jww.INFO.Printf("Setting Uncheck Round Period to %v", period) - p.CMix.Pickup.UncheckRoundPeriod = period + cmixParams.Network.Pickup.UncheckRoundPeriod = period } - p.CMix.VerboseRoundTracking = viper.GetBool( + cmixParams.Network.VerboseRoundTracking = viper.GetBool( "verboseRoundTracking") - return p + return cmixParams, e2eParams } -func initClient() *xxdk.E2e { +func initClient(cmixParams xxdk.CMIXParams, e2eParams xxdk.E2EParams) *xxdk.E2e { createClient() pass := parsePassword(viper.GetString("password")) storeDir := viper.GetString("session") jww.DEBUG.Printf("sessionDur: %v", storeDir) - params := initParams() - // load the client - baseclient, err := xxdk.LoadCmix(storeDir, pass, params) + baseclient, err := xxdk.LoadCmix(storeDir, pass, cmixParams) if err != nil { jww.FATAL.Panicf("%+v", err) } authCbs = makeAuthCallbacks( - viper.GetBool("unsafe-channel-creation")) + viper.GetBool("unsafe-channel-creation"), e2eParams) client, err := xxdk.LoginLegacy(baseclient, authCbs) if err != nil { @@ -761,7 +762,7 @@ func deleteChannel(client *xxdk.E2e, partnerId *id.ID) { } func addAuthenticatedChannel(client *xxdk.E2e, recipientID *id.ID, - recipient contact.Contact) { + recipient contact.Contact, e2eParams xxdk.E2EParams) { var allowed bool if viper.GetBool("unsafe-channel-creation") { msg := "unsafe channel creation enabled\n" @@ -790,7 +791,7 @@ func addAuthenticatedChannel(client *xxdk.E2e, recipientID *id.ID, // Verify that the auth request makes it to the recipient // by monitoring the round result if viper.GetBool("verify-sends") { - requestChannelVerified(client, recipientContact, me) + requestChannelVerified(client, recipientContact, me, e2eParams) } else { // Just call Request, agnostic of round result _, err := client.GetAuth().Request(recipientContact, @@ -807,7 +808,7 @@ func addAuthenticatedChannel(client *xxdk.E2e, recipientID *id.ID, } func resetAuthenticatedChannel(client *xxdk.E2e, recipientID *id.ID, - recipient contact.Contact) { + recipient contact.Contact, e2eParams xxdk.E2EParams) { var allowed bool if viper.GetBool("unsafe-channel-creation") { msg := "unsafe channel creation enabled\n" @@ -834,7 +835,8 @@ func resetAuthenticatedChannel(client *xxdk.E2e, recipientID *id.ID, // Verify that the auth request makes it to the recipient // by monitoring the round result if viper.GetBool("verify-sends") { - resetChannelVerified(client, recipientContact) + resetChannelVerified(client, recipientContact, + e2eParams) } else { _, err := client.GetAuth().Reset(recipientContact) if err != nil { @@ -847,9 +849,9 @@ func resetAuthenticatedChannel(client *xxdk.E2e, recipientID *id.ID, } } -func acceptChannelVerified(client *xxdk.E2e, recipientID *id.ID) { - paramsE2E := e2e.GetDefaultParams() - roundTimeout := paramsE2E.CMIXParams.SendTimeout +func acceptChannelVerified(client *xxdk.E2e, recipientID *id.ID, + params xxdk.E2EParams) { + roundTimeout := params.Base.CMIXParams.SendTimeout done := make(chan struct{}, 1) retryChan := make(chan struct{}, 1) @@ -884,9 +886,9 @@ func acceptChannelVerified(client *xxdk.E2e, recipientID *id.ID) { } func requestChannelVerified(client *xxdk.E2e, - recipientContact, me contact.Contact) { - paramsE2E := e2e.GetDefaultParams() - roundTimeout := paramsE2E.CMIXParams.SendTimeout + recipientContact, me contact.Contact, + params xxdk.E2EParams) { + roundTimeout := params.Base.CMIXParams.SendTimeout retryChan := make(chan struct{}, 1) done := make(chan struct{}, 1) @@ -923,9 +925,9 @@ func requestChannelVerified(client *xxdk.E2e, } } -func resetChannelVerified(client *xxdk.E2e, recipientContact contact.Contact) { - paramsE2E := e2e.GetDefaultParams() - roundTimeout := paramsE2E.CMIXParams.SendTimeout +func resetChannelVerified(client *xxdk.E2e, recipientContact contact.Contact, + params xxdk.E2EParams) { + roundTimeout := params.Base.CMIXParams.SendTimeout retryChan := make(chan struct{}, 1) done := make(chan struct{}, 1) diff --git a/cmd/single.go b/cmd/single.go index 2ce03e5c35162a909d3c502410ed35bede436c13..6b8bb772322d8509ace9c9d731074882a4e769f6 100644 --- a/cmd/single.go +++ b/cmd/single.go @@ -33,7 +33,8 @@ var singleCmd = &cobra.Command{ Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { - client := initClient() + cmixParams, e2eParams := initParams() + client := initClient(cmixParams, e2eParams) // Write user contact to file user := client.GetUser() diff --git a/cmd/ud.go b/cmd/ud.go index 4666cba3fec19f620b0903e191c3955b2b42439a..e6fd573e8d8d2b301a03fd7338fb1d78e3f67169 100644 --- a/cmd/ud.go +++ b/cmd/ud.go @@ -10,13 +10,14 @@ package cmd import ( "fmt" + "strings" + "time" + "gitlab.com/elixxir/client/single" "gitlab.com/elixxir/client/ud" "gitlab.com/elixxir/client/xxmutils" "gitlab.com/elixxir/primitives/fact" "gitlab.com/xx_network/primitives/utils" - "strings" - "time" "github.com/spf13/cobra" jww "github.com/spf13/jwalterweatherman" @@ -33,7 +34,8 @@ var udCmd = &cobra.Command{ Short: "Register for and search users using the xx network user discovery service.", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { - client := initClient() + cmixParams, e2eParams := initParams() + client := initClient(cmixParams, e2eParams) // get user and save contact to file user := client.GetUser() diff --git a/xxdk/cmix.go b/xxdk/cmix.go index 059c9d061ffa8b83db87cf30db140f05d5311f7f..6e2999850bddb2f4762478d5f3115b510831897f 100644 --- a/xxdk/cmix.go +++ b/xxdk/cmix.go @@ -122,7 +122,7 @@ func NewVanityClient(ndfJSON, storageDir string, password []byte, // NOTE: This is a helper function that, in most applications, should not be used on its own // Consider using LoadCmix instead, which calls this function for you. func OpenCmix(storageDir string, password []byte, - parameters Params) (*Cmix, error) { + parameters CMIXParams) (*Cmix, error) { jww.INFO.Printf("OpenCmix()") rngStreamGen := fastRNG.NewStreamGenerator(12, 1024, @@ -199,7 +199,7 @@ func NewProtoClient_Unsafe(ndfJSON, storageDir string, password []byte, } // LoadCmix initializes a Cmix object from existing storage and starts the network -func LoadCmix(storageDir string, password []byte, parameters Params) (*Cmix, error) { +func LoadCmix(storageDir string, password []byte, parameters CMIXParams) (*Cmix, error) { jww.INFO.Printf("LoadCmix()") c, err := OpenCmix(storageDir, password, parameters) @@ -207,7 +207,7 @@ func LoadCmix(storageDir string, password []byte, parameters Params) (*Cmix, err return nil, err } - c.network, err = cmix.NewClient(parameters.CMix, c.comms, c.storage, + c.network, err = cmix.NewClient(parameters.Network, c.comms, c.storage, c.rng, c.events) if err != nil { return nil, err diff --git a/xxdk/e2e.go b/xxdk/e2e.go index 598a5559d374a5da2ea749d2edf852361f9dd49d..98cee5deb65cf7d38f12118990c30dd736c65e0a 100644 --- a/xxdk/e2e.go +++ b/xxdk/e2e.go @@ -83,14 +83,12 @@ func LoginLegacy(client *Cmix, callbacks AuthCallbacks) (m *E2e, err error) { "the e2e processies") } - acw := &authCallbacksAdapter{ - ac: callbacks, - e2e: m, - } + acw := MakeAuthCB(m, callbacks) - m.auth, err = auth.NewStateLegacy(client.GetStorage().GetKV(), client.GetCmix(), - m.e2e, client.GetRng(), client.GetEventReporter(), - auth.GetDefaultParams(), acw, m.backup.TriggerBackup) + m.auth, err = auth.NewStateLegacy(client.GetStorage().GetKV(), + client.GetCmix(), m.e2e, client.GetRng(), + client.GetEventReporter(), auth.GetDefaultParams(), acw, + m.backup.TriggerBackup) if err != nil { return nil, err } @@ -110,7 +108,7 @@ func LoginLegacy(client *Cmix, callbacks AuthCallbacks) (m *E2e, err error) { // while replacing the base NDF. This is designed for some specific deployment // procedures and is generally unsafe. func LoginWithNewBaseNDF_UNSAFE(storageDir string, password []byte, - newBaseNdf string, params Params) (*E2e, error) { + newBaseNdf string, params CMIXParams) (*E2e, error) { jww.INFO.Printf("LoginWithNewBaseNDF_UNSAFE()") def, err := ParseNDF(newBaseNdf) @@ -150,7 +148,7 @@ func LoginWithNewBaseNDF_UNSAFE(storageDir string, password []byte, // some specific deployment procedures and is generally unsafe. func LoginWithProtoClient(storageDir string, password []byte, protoClientJSON []byte, newBaseNdf string, callbacks AuthCallbacks, - params Params) (*E2e, error) { + params CMIXParams) (*E2e, error) { jww.INFO.Printf("LoginWithProtoClient()") def, err := ParseNDF(newBaseNdf) @@ -253,10 +251,7 @@ func login(client *Cmix, callbacks AuthCallbacks, "the e2e processies") } - acw := &authCallbacksAdapter{ - ac: callbacks, - e2e: m, - } + acw := MakeAuthCB(m, callbacks) m.auth, err = auth.NewState(kv, client.GetCmix(), m.e2e, client.GetRng(), client.GetEventReporter(), @@ -434,6 +429,13 @@ type authCallbacksAdapter struct { e2e *E2e } +func MakeAuthCB(e2e *E2e, cbs AuthCallbacks) auth.Callbacks { + return &authCallbacksAdapter{ + ac: cbs, + e2e: e2e, + } +} + func (aca *authCallbacksAdapter) Request(partner contact.Contact, receptionID receptionID.EphemeralIdentity, round rounds.Round) { aca.ac.Request(partner, receptionID, round, aca.e2e) diff --git a/xxdk/params.go b/xxdk/params.go index c5768a2a0512560367f9e0cb5ad3d7f9221ab3c9..c8d5c3466867ee7f2d4058b8dc1aa7d655e7754a 100644 --- a/xxdk/params.go +++ b/xxdk/params.go @@ -7,32 +7,85 @@ package xxdk +// params.go define the high level parameters structures (which embed E2E and +// CMIX params respectively) that are passed down into the core xxdk modules. + import ( "encoding/json" + "gitlab.com/elixxir/client/cmix" + "gitlab.com/elixxir/client/e2e" "gitlab.com/elixxir/client/e2e/ratchet/partner/session" + "gitlab.com/elixxir/client/e2e/rekey" ) -type Params struct { - CMix cmix.Params - Session session.Params +// CMIXParams contains the parameters for Network tracking and for +// specific CMIX messaging settings. +// +// FIXME: this breakdown could be cleaner and is an unfortunate side effect of +// several refactors of the codebase. +type CMIXParams struct { + Network cmix.Params + CMIX cmix.CMIXParams +} + +// E2EParams holds all the settings for e2e and it's various submodules. +// +// NOTE: "Base" wraps cmix.CMIXParams to control message send params, +// so xxdk library users should copy the desired settings to both. +// FIXME: this should not wrap a copy of cmix.CMIXParams. +type E2EParams struct { + Session session.Params + Base e2e.Params + Rekey rekey.Params + EphemeralRekey rekey.Params +} + +//////////////////////////////////////// +// -- CMix Params Helper Functions -- // +//////////////////////////////////////// + +func GetDefaultCMixParams() CMIXParams { + return CMIXParams{ + Network: cmix.GetDefaultParams(), + CMIX: cmix.GetDefaultCMIXParams(), + } +} + +// ParseCMixParameters returns the default Params, or override with given +// parameters, if set. +func ParseCMixParameters(cmixParamsJSON string) (CMIXParams, error) { + p := GetDefaultCMixParams() + if len(cmixParamsJSON) > 0 { + err := json.Unmarshal([]byte(cmixParamsJSON), &p) + if err != nil { + return CMIXParams{}, err + } + } + return p, nil } -func GetDefaultParams() Params { - return Params{ - CMix: cmix.GetDefaultParams(), - Session: session.GetDefaultParams(), +//////////////////////////////////////// +// -- E2E Params Helper Functions -- // +//////////////////////////////////////// + +func GetDefaultE2EParams() E2EParams { + return E2EParams{ + Session: session.GetDefaultParams(), + Base: e2e.GetDefaultParams(), + Rekey: rekey.GetDefaultParams(), + EphemeralRekey: rekey.GetDefaultEphemeralParams(), } } // GetParameters returns the default Params, or override with given // parameters, if set. -func GetParameters(params string) (Params, error) { - p := GetDefaultParams() - if len(params) > 0 { - err := json.Unmarshal([]byte(params), &p) +func ParseE2EParameters(e2eParamsJSON string) (E2EParams, error) { + p := GetDefaultE2EParams() + if len(e2eParamsJSON) > 0 { + err := json.Unmarshal([]byte(e2eParamsJSON), &p) if err != nil { - return Params{}, err + return E2EParams{}, err } } return p, nil diff --git a/xxdk/params_test.go b/xxdk/params_test.go index 13868e1fb03e192a9a94cc916960d4121a871b08..47853d6f2a79ac12d8a5a66845030872130404cc 100644 --- a/xxdk/params_test.go +++ b/xxdk/params_test.go @@ -17,7 +17,7 @@ import ( // unmarshaling the Params object. func TestParams_MarshalUnmarshal(t *testing.T) { // Construct a set of params - p := GetDefaultParams() + p := GetDefaultCMixParams() // Marshal the params data, err := json.Marshal(&p) @@ -28,7 +28,7 @@ func TestParams_MarshalUnmarshal(t *testing.T) { t.Logf("%s", string(data)) // Unmarshal the params object - received := Params{} + received := CMIXParams{} err = json.Unmarshal(data, &received) if err != nil { t.Fatalf("Unmarshal error: %v", err) diff --git a/xxdk/utils_test.go b/xxdk/utils_test.go index e537fc3b9f7863f5ee051d03c61dc4dd0fc60937..cb88fc20c36269b469fc533625b1a6ce2120372a 100644 --- a/xxdk/utils_test.go +++ b/xxdk/utils_test.go @@ -45,7 +45,7 @@ func newTestingClient(face interface{}) (*Cmix, error) { "Could not construct a mock client: %v", err) } - c, err := OpenCmix(storageDir, password, GetDefaultParams()) + c, err := OpenCmix(storageDir, password, GetDefaultCMixParams()) if err != nil { return nil, errors.Errorf("Could not open a mock client: %v", err)