Skip to content

Having trouble with get() when getting a putSigned() value. #645

Answered by aberaud
n7tae asked this question in Q&A
Discussion options

You must be logged in to vote

Using putSigned would not be enough to make the value unique and allow to edit it.
The ValueID also has to be the same.

To do that:

  • Set a random non-0 id for the Value before the first putSigned, or let OpenDHT assign a random ID to the Value, then modify/reuse the same Value for the following putSigned
  • or build different Value objects but manually set the same non-0 value ID on them

If the value ID is 0 when putSigned is called, the value will be assigned a random ID during the putSigned (set by OpenDHT on the Value at some point between putSigned() and the done callback).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by n7tae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants