Skip to content

Commit

Permalink
plugins: undeprecate old form of hooks.
Browse files Browse the repository at this point in the history
This effectively reverts ac93b78.

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 <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Nov 17, 2020
1 parent 313976e commit f56266c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion external/libwally-core
Submodule libwally-core updated 182 files
6 changes: 2 additions & 4 deletions lightningd/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f56266c

Please sign in to comment.