Skip to content
Snippets Groups Projects
Commit 3297c745 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

WIP cmd conversion for restructure. This doesn't include UD which is being done separately

parent 4e1fcd84
No related branches found
No related tags found
4 merge requests!510Release,!207WIP: Client Restructure,!205cmd restructure,!203Symmetric broadcast
......@@ -12,6 +12,9 @@ package cmd
import (
"bufio"
"fmt"
"os"
"time"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
......@@ -19,8 +22,6 @@ import (
"gitlab.com/elixxir/client/groupChat"
"gitlab.com/elixxir/client/groupChat/groupStore"
"gitlab.com/xx_network/primitives/id"
"os"
"time"
)
// groupCmd represents the base command when called without any subcommands
......@@ -36,8 +37,6 @@ var groupCmd = &cobra.Command{
user := client.GetUser()
jww.INFO.Printf("User: %s", user.ReceptionID)
_, _ = initClientCallbacks(client)
err := client.StartNetworkFollower(5 * time.Second)
if err != nil {
jww.FATAL.Panicf("%+v", err)
......@@ -123,17 +122,14 @@ func initGroupManager(client *api.Client) (*groupChat.Manager,
}
jww.INFO.Print("Creating new group manager.")
manager, err := groupChat.NewManager(client, requestCb, receiveCb)
manager, err := groupChat.NewManager(client.GetNetworkInterface(),
client.GetE2EHandler(), client.GetStorage().GetReceptionID(),
client.GetRng(), client.GetStorage().GetE2EGroup(),
client.GetStorage().GetKV(), requestCb, receiveCb)
if err != nil {
jww.FATAL.Panicf("Failed to initialize group chat manager: %+v", err)
}
// Start group request and message receiver
err = client.AddService(manager.StartProcesses)
if err != nil {
jww.FATAL.Panicf("Failed to start groupchat services: %+v", err)
}
return manager, recChan, reqChan
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment