Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Regression in output of sync_state_genSyncSpec #11435

Closed
tomaka opened this issue May 17, 2022 · 3 comments
Closed

Regression in output of sync_state_genSyncSpec #11435

tomaka opened this issue May 17, 2022 · 3 comments

Comments

@tomaka
Copy link
Contributor

tomaka commented May 17, 2022

Before #8783, calling the sync_state_genSyncSpec JSON-RPC function would return something like this:

{"jsonrpc":"2.0","id":"...","result": {"name":"Westend", "chainType": "Live", ... } }

After the PR, the output looks like this:

{"jsonrpc":"2.0","id":"...","result": "{\"name\":\"Westend\", \"chainType\": \"Live\", ... }" }

In other words, the result has been stringified.

cc @niklasad1

@niklasad1
Copy link
Member

oops, sorry let me have a look

@tomaka
Copy link
Contributor Author

tomaka commented May 17, 2022

Note that I haven't actually checked what the function was returning before the PR (I have only checked the after). However we have a script that started failing after the PR has been deployed, and this script is directly expecting an object instead of a string, so what I wrote is the only possible explanation.

@niklasad1
Copy link
Member

you are correct, it returned serde_json::Value before I think I was got annoyed that as_json already returned it as JSON but forgot that the Strings are serialized differently.

one sec, I think we need to block the current release for this right?

niklasad1 added a commit that referenced this issue May 17, 2022
niklasad1 added a commit that referenced this issue May 17, 2022
chevdor pushed a commit that referenced this issue May 17, 2022
* fix: #11435

* address grumbles: better safe than sorry
chevdor added a commit that referenced this issue May 18, 2022
* fix: #11435

* address grumbles: better safe than sorry

Co-authored-by: Niklas Adolfsson <[email protected]>
godcodehunter pushed a commit to sensoriumxr/substrate that referenced this issue Jun 22, 2022
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this issue Aug 23, 2022
ark0f pushed a commit to gear-tech/substrate that referenced this issue Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants