From f56266c1c1e135a29124448b822b511ce7f3120b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 17 Nov 2020 12:30:04 +1030 Subject: [PATCH] plugins: undeprecate old form of hooks. This effectively reverts ac93b780d5a457f8f304d658e80b4d531fb3b0e4. Christian points out that plugins need time before we deprecate the old options (probably 6 months) as they need to work with both old and new. Changelog-Deprecated: **UNDO** plugins: hooks should now be specified using objects, not raw names. Suggested-by: @cdecker Signed-off-by: Rusty Russell --- CHANGELOG.md | 1 - external/libwally-core | 2 +- lightningd/plugin.c | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c650b419..fa4d11f8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,6 @@ This release named by Sergi Delgado Segura. Note: You should always set `allow-deprecated-apis=false` to test for changes. - - Plugins: hooks should now be specified using objects, not raw names. ([4168](https://github.com/ElementsProject/lightning/pull/4168)) - cli: scripts should filter out '^# ' or use `-N none`, as commands will start returning notifications soon ([4046](https://github.com/ElementsProject/lightning/pull/4046)) ### Removed diff --git a/external/libwally-core b/external/libwally-core index b8d7ea910..3784e626b 160000 --- a/external/libwally-core +++ b/external/libwally-core @@ -1 +1 @@ -Subproject commit b8d7ea91049c3d5522768c77c8bfe4936cbabbd7 +Subproject commit 3784e626b5685857b3ba1ced0fd657893f661bba diff --git a/lightningd/plugin.c b/lightningd/plugin.c index 370ee63b0..75d12a8a2 100644 --- a/lightningd/plugin.c +++ b/lightningd/plugin.c @@ -1108,12 +1108,10 @@ static const char *plugin_hooks_add(struct plugin *plugin, const char *buffer, name = json_strdup(tmpctx, buffer, nametok); beforetok = json_get_member(buffer, t, "before"); aftertok = json_get_member(buffer, t, "after"); - } else if (deprecated_apis) { + } else { + /* FIXME: deprecate in 3 releases after v0.9.2! */ name = json_strdup(tmpctx, plugin->buffer, t); beforetok = aftertok = NULL; - } else { - return tal_fmt(plugin, - "hooks must be an array of objects"); } hook = plugin_hook_register(plugin, name);