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

Incorrect metadata-hash param returned from v2/assets query. #366

Closed
barnjamin opened this issue Feb 28, 2021 · 2 comments · Fixed by #379
Closed

Incorrect metadata-hash param returned from v2/assets query. #366

barnjamin opened this issue Feb 28, 2021 · 2 comments · Fixed by #379
Labels
bug Something isn't working external contribution FDE

Comments

@barnjamin
Copy link
Contributor

When making a request to the v2/assets endpoint, I get what appears to be an incorrect metadata-hash in the response, apparently copied from a different asset in the payload.

The correct metadata-hash is returned when requesting a specific asset by id /v2/assets/{asset-id}
image

The incorrect metadata-hash is returned when making a request to /v2/assets?name=RareAF&limit=100 and is identical to (copied from?) another asset in the same payload.
image

There may be more params besides metadata-hash returned in the payload that are copied from a different asset but they happen to be identical in my example.

I don't have a test env setup to check but I did browse the relevant section in the indexer and nothing obvious stuck out.

One thing I did notice is the buffered channel here:

out := make(chan idb.AssetRow, 1)

Adding a buffer to a channel has almost always bit me with a subtle race bug. Unlikely to be the cause here but maybe something to look at.

@winder winder added bug Something isn't working external contribution FDE labels Mar 1, 2021
@brianolson
Copy link
Contributor

Which network is this on? I don't see it on mainnet.

@barnjamin
Copy link
Contributor Author

It was on TestNet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external contribution FDE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants