From b7699cff9f906d06a6c7d1cfd294f728bca2e2b0 Mon Sep 17 00:00:00 2001 From: darosior Date: Mon, 27 Jan 2020 01:25:13 +0100 Subject: [PATCH] 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 --- contrib/pyln-client/pyln/client/lightning.py | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/pyln-client/pyln/client/lightning.py b/contrib/pyln-client/pyln/client/lightning.py index 63b15bac2..f2239bf63 100644 --- a/contrib/pyln-client/pyln/client/lightning.py +++ b/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,