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

Add more debug logs

parent 9260239e
No related branches found
No related tags found
1 merge request!23Release
...@@ -92,7 +92,8 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St ...@@ -92,7 +92,8 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St
return nil, errors.WithMessagef(err, "Failed to "+ return nil, errors.WithMessagef(err, "Failed to "+
"unmarshal SentRequestMap") "unmarshal SentRequestMap")
} }
jww.INFO.Printf("Loaded requestIDlist: %s", string(sentObj.Data))
jww.INFO.Printf("Loading Auth Store for %d contacts", len(requestList))
for _, rDisk := range requestList { for _, rDisk := range requestList {
r := &request{ r := &request{
rt: RequestType(rDisk.T), rt: RequestType(rDisk.T),
...@@ -146,7 +147,7 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St ...@@ -146,7 +147,7 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St
func (s *Store) save() error { func (s *Store) save() error {
requestIDList := make([]requestDisk, len(s.requests)) requestIDList := make([]requestDisk, len(s.requests))
jww.INFO.Printf("Saving Auth Store")
index := 0 index := 0
for pid, r := range s.requests { for pid, r := range s.requests {
rDisk := requestDisk{ rDisk := requestDisk{
...@@ -161,7 +162,6 @@ func (s *Store) save() error { ...@@ -161,7 +162,6 @@ func (s *Store) save() error {
if err != nil { if err != nil {
return err return err
} }
obj := versioned.Object{ obj := versioned.Object{
Version: requestMapVersion, Version: requestMapVersion,
Timestamp: netTime.Now(), Timestamp: netTime.Now(),
...@@ -223,7 +223,7 @@ func (s *Store) AddSent(partner *id.ID, partnerHistoricalPubKey, myPrivKey, ...@@ -223,7 +223,7 @@ func (s *Store) AddSent(partner *id.ID, partnerHistoricalPubKey, myPrivKey,
func (s *Store) AddReceived(c contact.Contact) error { func (s *Store) AddReceived(c contact.Contact) error {
s.mux.Lock() s.mux.Lock()
defer s.mux.Unlock() defer s.mux.Unlock()
jww.INFO.Printf("AddReceived contact %s", c.ID)
if _, ok := s.requests[*c.ID]; ok { if _, ok := s.requests[*c.ID]; ok {
return errors.Errorf("Cannot add contact for partner "+ return errors.Errorf("Cannot add contact for partner "+
"%s, one already exists", c.ID) "%s, one already exists", c.ID)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment