jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
642 stars 307 forks source link

batch call parsing does not conform to JSON-RPC 2.0 standard #96

Open janmazak opened 5 years ago

janmazak commented 5 years ago

AuthProxy.batch_() should use ids to match responses with requests.

According to https://www.jsonrpc.org/specification: "The Response objects being returned from a batch call MAY be returned in any order within the Array. The Client SHOULD match contexts between the set of Request objects and the resulting set of Response objects based on the id member within each Object."

Now it is assumed that the server will keep the order the same.