mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
lightningd: allow 'style' 'legacy' for clboss compat (with deprecated_apis).
We keep the parameter around for future use (e.g. PTLC support?), but clboss master still sets 'style' to "legacy". Accept, but ignore it. Reported-by: grubman on #c-lightning (IRC) Changelog-Deprecated: JSON-RPC: `sendpay` `route` argument `style` "legacy" (don't use it at all, we ignore it now and always use "tlv" anyway). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "config.h"
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/bolt12_merkle.h>
|
||||
#include <common/configdir.h>
|
||||
#include <common/json_command.h>
|
||||
#include <common/json_helpers.h>
|
||||
#include <common/json_tok.h>
|
||||
@@ -1331,6 +1332,10 @@ static struct command_result *param_route_hop_style(struct command *cmd,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* We still let you *specify* this, but we ignore it! */
|
||||
if (deprecated_apis && json_tok_streq(buffer, tok, "legacy"))
|
||||
return NULL;
|
||||
|
||||
return command_fail_badparam(cmd, name, buffer, tok,
|
||||
"should be 'tlv' ('legacy' not supported)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user