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

Fix LoadOrNewManager docstring

parent b5cb085e
No related branches found
No related tags found
2 merge requests!510Release,!292Remove ud.LoadManager for LoadOrNewManager
......@@ -44,10 +44,18 @@ type Manager struct {
alternativeUd *alternateUd
}
// LoadOrNewManager builds a new user discovery manager.
// It requires that an updated
// NDF is available and will error if one is not.
// registrationValidationSignature may be set to nil
// LoadOrNewManager loads an existing Manager from storage or creates a
// new one if there is no extant storage information.
//
// Params
// - user is an interface that adheres to the xxdk.E2e object.
// - comms is an interface that adheres to client.Comms object.
// - follower is a method off of xxdk.Cmix which returns the network follower's status.
// - username is the name of the user as it is registered with UD. This will be what the end user
// provides if through the bindings.
// - networkValidationSig is a signature provided by the network (i.e. the client registrar). This may
// be nil if the caller knows the manager will be loaded. If a new manager is created, a nil signature
// will cause an error.
func LoadOrNewManager(user udE2e, comms Comms, follower udNetworkStatus,
username string, networkValidationSig []byte) (*Manager, error) {
jww.INFO.Println("ud.LoadOrNewManager()")
......@@ -59,8 +67,8 @@ func LoadOrNewManager(user udE2e, comms Comms, follower udNetworkStatus,
// Initialize manager
m := &Manager{
user: user,
comms: comms,
user: user,
comms: comms,
}
if m.isRegistered() {
......
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