Skip to content

Commit

Permalink
pyln: actually specify jsonrpc in requests
Browse files Browse the repository at this point in the history
As per the spec (https://www.jsonrpc.org/specification#request_object)

```
A rpc call is represented by sending a Request object to a Server. The Request object has the following members:

jsonrpc
    A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".
```
  • Loading branch information
darosior committed Jan 27, 2020
1 parent 6489e63 commit a473ffc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/pyln-client/pyln/client/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def call(self, method, payload=None):
# FIXME: we open a new socket for every readobj call...
sock = UnixSocket(self.socket_path)
self._writeobj(sock, {
"jsonrpc": "2.0",
"method": method,
"params": payload,
"id": self.next_id,
Expand Down

0 comments on commit a473ffc

Please sign in to comment.