Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work be1 stuart create architecture package #1782

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions be1-go/channel/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func (s *Sockets) Delete(ID string) bool {

// HubFunctionalities defines the functions needed by a channel from the hub.
type HubFunctionalities interface {
GetPubKeyOwner() kyber.Point
GetPubKeyServ() kyber.Point
GetPubKeyOwner() kyber.Point // Become useless
GetPubKeyServ() kyber.Point // Become useless
Sign([]byte) ([]byte, error)
GetSchemaValidator() validation.SchemaValidator
NotifyNewChannel(channelID string, channel Channel, socket socket.Socket)
Expand Down
2 changes: 1 addition & 1 deletion be1-go/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func Serve(cliCtx *cli.Context) error {
ownerKey(serverConfig.PublicKey, &point)

// create user hub
h, err := hub.NewHub(point, serverConfig.ClientAddress, serverConfig.ServerAddress, log.With().Str("role", "server").Logger(),
h, err := hub.New(point, serverConfig.ClientAddress, serverConfig.ServerAddress, log.With().Str("role", "server").Logger(),
lao.NewChannel)
if err != nil {
return xerrors.Errorf("failed create the hub: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions be1-go/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
func TestConnectToSocket(t *testing.T) {
log := zerolog.New(io.Discard)

oh, err := hub.NewHub(crypto.Suite.Point(), "", "", log, lao.NewChannel)
oh, err := hub.New(crypto.Suite.Point(), "", "", log, lao.NewChannel)
require.NoError(t, err)
oh.Start()

Expand All @@ -46,7 +46,7 @@ func TestConnectToSocket(t *testing.T) {

time.Sleep(1 * time.Second)

wh, err := hub.NewHub(crypto.Suite.Point(), "", "", log, lao.NewChannel)
wh, err := hub.New(crypto.Suite.Point(), "", "", log, lao.NewChannel)
require.NoError(t, err)
wDone := make(chan struct{})
wh.Start()
Expand Down
Loading
Loading