Browse Source

paymod: Add a COMPAT_090 flag

Since we end up consolidating some of the return values for `pay` and
`paystatus` and change the public interface we need to add the compatibility
flag and guard the switchover behind it.
paymod-03
Christian Decker 5 years ago
parent
commit
6fbfe24e3e
  1. 2
      Makefile
  2. 8
      plugins/pay.c

2
Makefile

@ -65,7 +65,7 @@ endif
ifeq ($(COMPAT),1) ifeq ($(COMPAT),1)
# We support compatibility with pre-0.6. # We support compatibility with pre-0.6.
COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1
endif endif
# Timeout shortly before the 600 second travis silence timeout # Timeout shortly before the 600 second travis silence timeout

8
plugins/pay.c

@ -1269,6 +1269,9 @@ static struct pay_status *add_pay_status(struct pay_command *pc,
return ps; return ps;
} }
#ifndef COMPAT_V090
UNUSED
#endif
static struct command_result *json_pay(struct command *cmd, static struct command_result *json_pay(struct command *cmd,
const char *buf, const char *buf,
const jsmntok_t *params) const jsmntok_t *params)
@ -1705,13 +1708,15 @@ static void init(struct plugin *p,
maxdelay_default = atoi(field); maxdelay_default = atoi(field);
} }
#if DEVELOPER
struct payment_modifier *paymod_mods[3] = { struct payment_modifier *paymod_mods[3] = {
&dummy_pay_mod, &dummy_pay_mod,
&retry_pay_mod, &retry_pay_mod,
NULL, NULL,
}; };
#if !DEVELOPER
UNUSED
#endif
static struct command_result *json_paymod(struct command *cmd, static struct command_result *json_paymod(struct command *cmd,
const char *buf, const char *buf,
const jsmntok_t *params) const jsmntok_t *params)
@ -1770,7 +1775,6 @@ static struct command_result *json_paymod(struct command *cmd,
return command_still_pending(cmd); return command_still_pending(cmd);
} }
#endif
static const struct plugin_command commands[] = { { static const struct plugin_command commands[] = { {
"pay", "pay",

Loading…
Cancel
Save