Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After running into issues while testing public-pool using the latest main commit of bitcoin-core, I finally found that the root cause of my pain was the json-rpc version field which is used by this library.
According to json-rpc spec, the json-rpc version HAS to be a string. But here it's created as a number, in the body used for rpc request:
rpc-bitcoin/src/rpc.ts
Line 413 in ace0f68
This leads to an error from bitcoin-core, since in this PR that has been merged a check was introduced. The line where the error is generated is here: https://github.com/bitcoin/bitcoin/blob/ff7d2054c4f1d7ff98078b9695e7c36e79a476c6/src/rpc/request.cpp#L197
This PR fixes this incompatibility, by using a string instead of a number there.