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

@@ -17,7 +17,7 @@ enum class JSONRPCVersion {
};
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id);
UniValue JSONRPCReplyObj(UniValue result, UniValue error, UniValue id);
UniValue JSONRPCReplyObj(UniValue result, UniValue error, UniValue id, JSONRPCVersion jsonrpc_version);
UniValue JSONRPCError(int code, const std::string& message);
/** Generate a new RPC authentication cookie and write it to disk */