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

feature: batch request for electrum #134

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

lord2anil
Copy link
Contributor

Modified the handle_message function of electrum_protocol for handling batch requests

closes #107

@Davidson-Souza
Copy link
Collaborator

Hi @lord2anil thank you for your pr. Did you test this with some wallet? I'm not sure how do we tell wallets that we support batching, but I think we need to do something

@lord2anil
Copy link
Contributor Author

Okay, I will test it and notify you once I am done.

@lord2anil
Copy link
Contributor Author

lord2anil commented Apr 4, 2024

Hi, I tested the API, with this payload (send data as vector)
payload = [ { 'jsonrpc': '2.0', 'method': 'method1', 'params': [], 'id': 1 }, { 'jsonrpc': '2.0', 'method': 'method2', 'params':[], 'id': 2 }, { 'jsonrpc': '2.0', 'method': 'method3', 'params': [], 'id': 3 } ]
And it is working for batch requests.

for a single request
the payload is
payload = { 'method': method, 'params': [ ], 'jsonrpc': '2.0', 'id': '0', }

@Davidson-Souza
Copy link
Collaborator

ACK 7ccb885

@Davidson-Souza Davidson-Souza merged commit ea3bb38 into vinteumorg:master Apr 8, 2024
5 of 6 checks passed
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.

feature: batch request for electrum
2 participants