rpc: Add "jsonrpc" field and drop null "result"/"error" fields

Only for JSON-RPC 2.0 requests.
This commit is contained in:
Matthew Zipkin
2023-07-07 14:41:23 -04:00
parent 2ca1460ae3
commit 466b90562f
6 changed files with 28 additions and 18 deletions

View File

@@ -364,7 +364,7 @@ UniValue JSONRPCExec(const JSONRPCRequest& jreq)
// but inside a batch, we just include the error object and return HTTP 200
UniValue result = tableRPC.execute(jreq);
return JSONRPCReplyObj(std::move(result), NullUniValue, jreq.id);
return JSONRPCReplyObj(std::move(result), NullUniValue, jreq.id, jreq.m_json_version);
}
/**