Skip to content

Question about implementation of registry::valid #1250

Answered by skypjack
chw0239 asked this question in Q&A
Discussion options

You must be logged in to vote

Good question. They are the same, but for a very specific case.
When you delete an identifier, the entity remains the same while the version is increased. The new identifier is kept in the storage for reuse.
In theory, you can then construct the same identifier with the entity traits and query the storage for validity. Since the identifier is there, but is reserved for recycling, it's invalid from the point of view of the user. That is, it wasn't returned yet nor made available.
Will anyone ever do this type of query? I don't think so. However, the check you see prevents errors. You never know? 🙂

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@chw0239
Comment options

@skypjack
Comment options

@chw0239
Comment options

@chw0239
Comment options

Answer selected by chw0239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question open question
2 participants