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

Allow non-integer id's in JSON RPC requests #1

Merged
merged 1 commit into from
Mar 13, 2013

Conversation

doublec
Copy link
Contributor

@doublec doublec commented Mar 13, 2013

I've noticed some clients sending a non-numeric "id" in the JSON RPC request when doing a subscribe request. In particular one was sending the string "s". The JSON RPC spec allows numbers and strings.

This patch uses "optLong" instead of "getLong" to avoid failing with an exception, and where the "id" returned back to the client it uses "opt" to deal with whatever format the original request used.

fireduck64 added a commit that referenced this pull request Mar 13, 2013
Allow non-integer id's in JSON RPC requests
@fireduck64 fireduck64 merged commit 585052b into fireduck64:master Mar 13, 2013
@fireduck64
Copy link
Owner

Sounds good. Can you point me to this JSON RPC spec? Sounds like something I should read.

@doublec
Copy link
Contributor Author

doublec commented Mar 13, 2013

This is the spec - not sure how many clients actually follow it though: http://www.jsonrpc.org/specification

@fireduck64
Copy link
Owner

Wow, it took literally 3 seconds to find something that everyone is doing
wrong:

errorThis member is REQUIRED on error.
This member MUST NOT exist if there was no error triggered during
invocation.

On Wed, Mar 13, 2013 at 4:06 PM, Chris Double notifications@github.comwrote:

This is the spec - not sure how many clients actually follow it though:
http://www.jsonrpc.org/specification


Reply to this email directly or view it on GitHubhttps://github.com//pull/1#issuecomment-14874399
.

GuyPaddock added a commit to GuyPaddock/SockThing that referenced this pull request May 3, 2020
- Coinbase is now maintained on the connection rather than the job, to
enable extra nonce fireduck64#1 to be sent earlier in the stratum session.
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.

None yet

2 participants