diff --git a/api/client.go b/api/client.go index 7757aaaa5a94b7a03ab45e3629c573362c249f64..40537629cd1aa903aba74a16c9b4bdc8ad5bfe20 100644 --- a/api/client.go +++ b/api/client.go @@ -139,7 +139,8 @@ func NewPrecannedClient(precannedID uint, defJSON, storageDir string, password [ // Login initalizes a client object from existing storage. func Login(storageDir string, password []byte) (*Client, error) { // Use fastRNG for RNG ops (AES fortuna based RNG using system RNG) - rngStreamGen := fastRNG.NewStreamGenerator(12, 3, csprng.NewSystemRNG) + rngStreamGen := fastRNG.NewStreamGenerator(12, 3, + csprng.NewSystemRNG) // Load Storage passwordStr := string(password) diff --git a/bindings/client.go b/bindings/client.go index 0d33e4649df6caeab7d045c21938280e9a8ff75d..056750aff4b4d118d3abf27b721c3100d62d7469 100644 --- a/bindings/client.go +++ b/bindings/client.go @@ -16,7 +16,6 @@ import ( "gitlab.com/elixxir/primitives/states" "gitlab.com/xx_network/primitives/id" "time" - jww "github.com/spf13/jwalterweatherman" ) // BindingsClient wraps the api.Client, implementing additional functions @@ -145,12 +144,12 @@ func (c *Client) RegisterNetworkHealthCB(nhc NetworkHealthCallback) { // Message Types can be found in client/interfaces/message/type.go // Make sure to not conflict with ANY default message types func (c *Client) RegisterListener(uid []byte, msgType int, - listener Listener) (Unregister, error) { + listener Listener) error { name := listener.Name() u, err := id.Unmarshal(uid) if err != nil { - return Unregister{}, err + return err } mt := message.Type(msgType) @@ -158,9 +157,9 @@ func (c *Client) RegisterListener(uid []byte, msgType int, listener.Hear(item) } - lid := c.api.GetSwitchboard().RegisterFunc(name, u, mt, f) + c.api.GetSwitchboard().RegisterFunc(name, u, mt, f) - return newListenerUnregister(lid, c.api.GetSwitchboard()), nil + return nil } // RegisterRoundEventsHandler registers a callback interface for round