Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
7b874e48
Commit
7b874e48
authored
2 years ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Make a copy of the contact object
parent
63d29af2
No related branches found
No related tags found
3 merge requests
!233
Modify restore to call user-defined bindings callback. Add Sent requests to...
,
!231
Revert "Update store to print changes to the partners list"
,
!192
Hotfix/improved restore
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xxmutils/restoreContacts.go
+11
-2
11 additions, 2 deletions
xxmutils/restoreContacts.go
with
11 additions
and
2 deletions
xxmutils/restoreContacts.go
+
11
−
2
View file @
7b874e48
...
...
@@ -24,6 +24,7 @@ import (
"gitlab.com/elixxir/client/storage/versioned"
"gitlab.com/elixxir/client/ud"
"gitlab.com/elixxir/crypto/contact"
"gitlab.com/elixxir/primitives/fact"
"gitlab.com/xx_network/primitives/id"
)
...
...
@@ -235,9 +236,17 @@ func LookupContact(userID *id.ID, udManager *ud.Manager,
if
myErr
!=
nil
{
err
=
myErr
}
result
=
&
c
newOwnership
:=
make
([]
byte
,
len
(
c
.
OwnershipProof
))
copy
(
newOwnership
,
c
.
OwnershipProof
)
newFacts
,
_
,
_
:=
fact
.
UnstringifyFactList
(
c
.
Facts
.
Stringify
())
result
=
&
contact
.
Contact
{
ID
:
c
.
ID
.
DeepCopy
(),
DhPubKey
:
c
.
DhPubKey
.
DeepCopy
(),
OwnershipProof
:
newOwnership
,
Facts
:
newFacts
,
}
waiter
.
Unlock
()
extLookupCB
(
c
,
myErr
)
extLookupCB
(
*
result
,
myErr
)
}
// Take lock once to make sure I will wait
waiter
.
Lock
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment