Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -1 when name_ttl is not specified on name_update events #3843

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sborrazas
Copy link
Contributor

Right now, there's no way to distinguish on the env event if the AENS
update was called using Some(0) (update the name to expire
immediately) or None (don't update the name TTL).

This implementation now returns name_ttl = 0 when it was supposed to
expire immediately and name_ttl = -1 when the name_ttl is supposed
to remain untouched.

Right now, there's no way to distinguish on the env event if the AENS
update was called using `Some(0)` (update the name to expire
immediately) or `None` (don't update the name TTL).

This implementation now returns name_ttl = 0 when it was supposed to
expire immediately and `name_ttl = -1` when the name_ttl is supposed
to remain untouched.
@hanssv
Copy link
Member

hanssv commented Mar 4, 2022

Isn't there exactly the same issue with pointers (and client_ttl) - where we also sometimes pass None and keep the previous value?

@sborrazas
Copy link
Contributor Author

@hanssv what default values do you suggest using for these two cases?

@hanssv
Copy link
Member

hanssv commented Mar 4, 2022

Forclient_ttl I guess -1 would work. But for pointers I don't know, there are no type correct values that are easily distinguishable 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants