From e8f7ab12a943b4bd53dedaf97f394481c452c9f8 Mon Sep 17 00:00:00 2001
From: joshemb <josh@elixxir.io>
Date: Fri, 23 Sep 2022 15:48:43 -0700
Subject: [PATCH] Clean up

---
 backup/backup.go        |  6 ------
 backup/backupRestore.go |  6 ------
 ud/store/facts.go       | 11 -----------
 3 files changed, 23 deletions(-)

diff --git a/backup/backup.go b/backup/backup.go
index 1db29a26d..b7fc57f5e 100644
--- a/backup/backup.go
+++ b/backup/backup.go
@@ -94,8 +94,6 @@ func InitializeBackup(backupPassphrase string, updateBackupCb UpdateBackupFn,
 	container *xxdk.Container, e2e E2e, session Session, ud UserDiscovery,
 	kv *versioned.KV, rng *fastRNG.StreamGenerator) (*Backup, error) {
 
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (InitializeBackup): ud passed in is %+v", ud)
-
 	b := &Backup{
 		updateBackupCb: updateBackupCb,
 		container:      container,
@@ -146,8 +144,6 @@ func ResumeBackup(updateBackupCb UpdateBackupFn, container *xxdk.Container,
 		return nil, err
 	}
 
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (resume backup): ud passed in is %+v", ud)
-
 	b := &Backup{
 		updateBackupCb: updateBackupCb,
 		container:      container,
@@ -308,10 +304,8 @@ func (b *Backup) assembleBackup() backup.Backup {
 
 	// Get facts
 	if b.ud != nil {
-		jww.INFO.Printf("USERNAME BACKUP DEBUG (assembleBackup): Getting facts from UD: %v", b.ud.GetFacts())
 		bu.UserDiscoveryRegistration.FactList = b.ud.GetFacts()
 	} else {
-		jww.INFO.Printf("USERNAME BACKUP DEBUG (assembleBackup): ud is nil, putting empty list")
 		bu.UserDiscoveryRegistration.FactList = fact.FactList{}
 	}
 
diff --git a/backup/backupRestore.go b/backup/backupRestore.go
index 34e6992e2..2d408c173 100644
--- a/backup/backupRestore.go
+++ b/backup/backupRestore.go
@@ -81,8 +81,6 @@ func NewCmixFromBackup(ndfJSON, storageDir, backupPassphrase string,
 	}
 
 	udInfo := backUp.UserDiscoveryRegistration
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (NewCmixFromBackup): fact list %+v", udInfo)
-
 	var username, email, phone fact.Fact
 	for _, f := range udInfo.FactList {
 		switch f.T {
@@ -94,10 +92,6 @@ func NewCmixFromBackup(ndfJSON, storageDir, backupPassphrase string,
 			phone = f
 		}
 	}
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (NewCmixFromBackup) facts found:"+
-		"\nusername: %v"+
-		"\nemail %v"+
-		"\nphone %+v", username, email, phone)
 
 	err = ud.InitStoreFromBackup(storageSess.GetKV(), username, email, phone)
 	return backUp.Contacts.Identities, backUp.JSONParams, err
diff --git a/ud/store/facts.go b/ud/store/facts.go
index 5ffb505b4..4721b864e 100644
--- a/ud/store/facts.go
+++ b/ud/store/facts.go
@@ -10,7 +10,6 @@ package ud
 import (
 	"fmt"
 	"github.com/pkg/errors"
-	jww "github.com/spf13/jwalterweatherman"
 	"gitlab.com/elixxir/primitives/fact"
 )
 
@@ -49,7 +48,6 @@ func (s *Store) RestoreFromBackUp(backupData fact.FactList) error {
 func (s *Store) StoreUsername(f fact.Fact) error {
 	s.mux.Lock()
 	defer s.mux.Unlock()
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (StoreUsername): storing username: %+v", f)
 
 	if f.T != fact.Username {
 		return errors.Errorf("Fact (%s) is not of type username", f.Stringify())
@@ -70,12 +68,8 @@ func (s *Store) GetUsername() (string, error) {
 	// todo: refactor this in the future so that
 	//  it's an O(1) lookup (place this object in another map
 	//  or have it's own field)
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (GetUsername): map: %+v", s.confirmedFacts)
-
 	for f := range s.confirmedFacts {
 		if f.T == fact.Username {
-			jww.INFO.Printf("USERNAME BACKUP DEBUG (GetUsername): found fact: %+v", f)
-
 			return f.Fact, nil
 		}
 	}
@@ -178,8 +172,6 @@ func (s *Store) BackUpMissingFacts(username, email, phone fact.Fact) error {
 		}
 	}
 
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (BackUpMissingFacts): fact map after %+v", s.confirmedFacts)
-
 	if modified {
 		return s.saveConfirmedFacts()
 	}
@@ -218,15 +210,12 @@ func (s *Store) GetFacts() []fact.Fact {
 	s.mux.RLock()
 	defer s.mux.RUnlock()
 
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (getFacts): all the facts in the map: %+v", s.confirmedFacts)
 	// Flatten the facts into a slice
 	facts := make([]fact.Fact, 0, len(s.confirmedFacts))
 	for f := range s.confirmedFacts {
 		facts = append(facts, f)
 	}
 
-	jww.INFO.Printf("USERNAME BACKUP DEBUG (getFacts): returned facts: %+v", facts)
-
 	return facts
 }
 
-- 
GitLab