From e93a305cafc4d5704362f22553533aa3babd5e3c Mon Sep 17 00:00:00 2001 From: joshemb <josh@elixxir.io> Date: Mon, 26 Sep 2022 10:23:33 -0700 Subject: [PATCH] Clean up API --- bindings/ud.go | 2 ++ ud/lookup.go | 24 ------------------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/bindings/ud.go b/bindings/ud.go index 4cecbfe2a..59d54f8c9 100644 --- a/bindings/ud.go +++ b/bindings/ud.go @@ -490,6 +490,8 @@ func MultiLookupUD(e2eID int, udContact []byte, cb UdMultiLookupCallback, return err } + jww.INFO.Printf("ud.MultiLookupUD(%s, %s)", idList, p.Timeout) + respCh := make(chan lookupResp, len(idList)) for _, uid := range idList { callback := func(c contact.Contact, err error) { diff --git a/ud/lookup.go b/ud/lookup.go index 569dc5b99..867c2900c 100644 --- a/ud/lookup.go +++ b/ud/lookup.go @@ -44,30 +44,6 @@ func Lookup(user udE2e, return lookup(net, rng, uid, grp, udContact, callback, p) } -// BatchLookup performs a Lookup operation on a list of user IDs. -// The lookup performs a callback on each lookup on the returned contact object -// constructed from the response. -func BatchLookup(udContact contact.Contact, - net udCmix, callback lookupCallback, - rng csprng.Source, - uids []*id.ID, grp *cyclic.Group, - p single.RequestParams) { - jww.INFO.Printf("ud.BatchLookup(%s, %s)", uids, p.Timeout) - - for _, uid := range uids { - go func(localUid *id.ID) { - _, _, err := lookup(net, rng, localUid, grp, - udContact, callback, p) - if err != nil { - jww.WARN.Printf("Failed batch lookup on user %s: %v", - localUid, err) - } - }(uid) - } - - return -} - // lookup is a helper function which sends a lookup request to the user discovery // service. It will construct a contact object off of the returned public key. // The callback will be called on that contact object. -- GitLab