mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-19 21:14:38 +01:00
jsonrpc_errors.h: Header for JSON-RPC errors.
This commit is contained in:
committed by
Christian Decker
parent
b3534462e0
commit
6d789282c9
@@ -78,7 +78,8 @@ ALL_OBJS += $(LIGHTNINGD_OBJS)
|
||||
# We accumulate all lightningd/ headers in these three:
|
||||
LIGHTNINGD_HEADERS_NOGEN = \
|
||||
$(LIGHTNINGD_SRC:.c=.h) \
|
||||
lightningd/peer_state.h
|
||||
lightningd/peer_state.h \
|
||||
lightningd/jsonrpc_errors.h
|
||||
|
||||
# Generated headers
|
||||
LIGHTNINGD_HEADERS_GEN = \
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <lightningd/chaintopology.h>
|
||||
#include <lightningd/jsonrpc.h>
|
||||
#include <lightningd/jsonrpc_errors.h>
|
||||
#include <lightningd/lightningd.h>
|
||||
#include <lightningd/log.h>
|
||||
#include <lightningd/options.h>
|
||||
@@ -470,10 +471,6 @@ void json_add_address(struct json_result *response, const char *fieldname,
|
||||
json_object_end(response);
|
||||
}
|
||||
|
||||
#define JSONRPC2_INVALID_REQUEST -32600
|
||||
#define JSONRPC2_METHOD_NOT_FOUND -32601
|
||||
#define JSONRPC2_INVALID_PARAMS -32602
|
||||
|
||||
void command_success(struct command *cmd, struct json_result *result)
|
||||
{
|
||||
struct json_connection *jcon = cmd->jcon;
|
||||
|
||||
13
lightningd/jsonrpc_errors.h
Normal file
13
lightningd/jsonrpc_errors.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/* lightningd/jsonrpc_errors.h
|
||||
* Lists error codes for JSON-RPC.
|
||||
*/
|
||||
#ifndef LIGHTNING_LIGHTNINGD_JSONRPC_ERRORS_H
|
||||
#define LIGHTNING_LIGHTNINGD_JSONRPC_ERRORS_H
|
||||
#include "config.h"
|
||||
|
||||
/* Standad errors defined by JSON-RPC 2.0 standard */
|
||||
#define JSONRPC2_INVALID_REQUEST -32600
|
||||
#define JSONRPC2_METHOD_NOT_FOUND -32601
|
||||
#define JSONRPC2_INVALID_PARAMS -32602
|
||||
|
||||
#endif /* !defined (LIGHTNING_LIGHTNINGD_JSONRPC_ERRORS_H) */
|
||||
Reference in New Issue
Block a user