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

Fix bug

parent 678f6278
No related branches found
No related tags found
2 merge requests!510Release,!333Frond End Assistance And Iterative Clean Up
......@@ -4,7 +4,6 @@ import (
"github.com/pkg/errors"
"gitlab.com/elixxir/crypto/contact"
"gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/primitives/id"
"time"
)
......@@ -23,35 +22,26 @@ func (m *Manager) setUserDiscovery(cert,
params.AuthEnabled = false
params.SendTimeout = 20 * time.Second
udIdBytes, dhPubKeyBytes, err := contact.ReadContactFromFile(contactFile)
if err != nil {
return err
}
udID, err := id.Unmarshal(udIdBytes)
// Unmarshal the new contact
con, err := contact.Unmarshal(contactFile)
if err != nil {
return err
}
// Add a new host and return it if it does not already exist
host, err := m.comms.AddHost(udID, address,
host, err := m.comms.AddHost(con.ID, address,
cert, params)
if err != nil {
return errors.WithMessage(err, "User Discovery host object could "+
"not be constructed.")
}
dhPubKey := m.user.GetE2E().GetGroup().NewInt(1)
err = dhPubKey.UnmarshalJSON(dhPubKeyBytes)
if err != nil {
return err
}
// Set the user discovery object within the manager
m.ud = &userDiscovery{
host: host,
contact: contact.Contact{
ID: udID,
DhPubKey: dhPubKey,
ID: con.ID,
DhPubKey: con.DhPubKey,
},
}
......
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