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

Remove the JsonRpcResponses type #735

Open
tomaka opened this issue Jun 14, 2023 · 1 comment
Open

Remove the JsonRpcResponses type #735

tomaka opened this issue Jun 14, 2023 · 1 comment

Comments

@tomaka
Copy link
Contributor

tomaka commented Jun 14, 2023

I'm not very happy with the JsonRpcResponses type in the public API of the light client.

I think that it should instead be a pub fn next_json_rpc_response(&self, ChainId) function of the Client.

This probably requires deeper changes to the API of the Client.

@tomaka
Copy link
Contributor Author

tomaka commented Jul 17, 2023

This issue is more or less tied to #91

Doing this change would require changing the Client to have interior mutability.

At the moment, the Client's API accepts &mut self everywhere, meaning that the Wasm node can do things such as adding a chain without running the risk of having to wait to lock a mutex.

The good news is that the JS API is ready to accomodate for an asynchronous add_chain function. Only the internal plumbing would need to be updated.

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

No branches or pull requests

1 participant