Browse Source

pyln: actually specify jsonrpc in requests

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".
```

Changelog-fixed: pyln now includes the "jsonrpc" field to jsonrpc2 requests
travis-debug
darosior 5 years ago
committed by Christian Decker
parent
commit
b7699cff9f
  1. 1
      contrib/pyln-client/pyln/client/lightning.py

1
contrib/pyln-client/pyln/client/lightning.py

@ -285,6 +285,7 @@ class UnixDomainSocketRpc(object):
# 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,

Loading…
Cancel
Save