diff --git a/backup/backup.go b/backup/backup.go index 1db29a26d82552c84a4f7adea090bd17cca5b040..b7fc57f5e3d46cb4e17277cc2d236b146cffd74f 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 34e6992e2baf292533db3a03d4ceb3a09cd7d996..2d408c173b49cd1a82d824b480bb3c2c47fcddce 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 5ffb505b42bba578f3f49d2e807ae7debc43942d..4721b864ead28fb44a6e2a3c7bd7b87196d4c9f8 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 }