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

<DB as ReadonlyStorage>::get treats empty values as missing keys #56

Closed
reuvenpo opened this issue Mar 18, 2020 · 4 comments · Fixed by #67
Closed

<DB as ReadonlyStorage>::get treats empty values as missing keys #56

reuvenpo opened this issue Mar 18, 2020 · 4 comments · Fixed by #67

Comments

@reuvenpo
Copy link
Contributor

The signature of the <DB as ReadonlyStorage>::get method suggests that the method distinguishes missing keys from keys with empty values, but as you can see on line 33, it returns None for empty keys. Looks like len=0 is returned for missing keys as well (which makes sense).

This is related to #55 .

@webmaster128
Copy link
Member

I don't know if the storage backend can differentiate the two cases (zero/null handling in Go seems to be a big 🤯 and it does not get easier over FFI). But I think we should work towards supporting both cases. Then an application can choose to treat them as the same thing or not.

@reuvenpo
Copy link
Contributor Author

This has been resolved in #67 . @webmaster128 @ethanfrey I think we can close this issue.

@webmaster128
Copy link
Member

Nice. Can you add "Closes #56" to into the PR description, to get the linking right?

@reuvenpo reuvenpo mentioned this issue Apr 22, 2020
12 tasks
@reuvenpo
Copy link
Contributor Author

Sure, Done :)

faddat pushed a commit to faddat/go-cosmwasm that referenced this issue Dec 10, 2021
faddat pushed a commit to faddat/go-cosmwasm that referenced this issue Dec 10, 2021
Modified url and fixed query contract
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 a pull request may close this issue.

2 participants