Browse Source

renamed error code

Signed-off-by: Mark Beckwith <wythe@intrig.com>
ppa-0.6.1
Mark Beckwith 7 years ago
committed by Christian Decker
parent
commit
428da65fb1
  1. 4
      lightningd/jsonrpc_errors.h
  2. 6
      lightningd/param.c

4
lightningd/jsonrpc_errors.h

@ -15,7 +15,9 @@
* with a specific error code, and then removed.
*/
#define LIGHTNINGD -1
#define LIGHTNINGD_INTERNAL -2
/* Developer error in the parameters to param() call */
#define PARAM_DEV_ERROR -2
/* Errors from `pay`, `sendpay`, or `waitsendpay` commands */
#define PAY_IN_PROGRESS 200

6
lightningd/param.c

@ -284,7 +284,7 @@ static bool param_arr(struct command *cmd, const char *buffer,
{
#if DEVELOPER
if (!check_params(params)) {
command_fail(cmd, LIGHTNINGD_INTERNAL, "programmer error");
command_fail(cmd, PARAM_DEV_ERROR, "programmer error");
return false;
}
#endif
@ -312,8 +312,8 @@ bool param(struct command *cmd, const char *buffer,
void *arg = va_arg(ap, void *);
size_t argsize = va_arg(ap, size_t);
if (!param_add(&params, name, required, cb, arg, argsize)) {
command_fail(cmd, LIGHTNINGD_INTERNAL,
"programmer error");
command_fail(cmd, PARAM_DEV_ERROR, "programmer error");
va_end(ap);
return false;
}
}

Loading…
Cancel
Save