Skip to content

Commit f56266c

Browse files
committed
plugins: undeprecate old form of hooks.
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 <[email protected]>
1 parent 313976e commit f56266c

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ This release named by Sergi Delgado Segura.
4343

4444
Note: You should always set `allow-deprecated-apis=false` to test for changes.
4545

46-
- Plugins: hooks should now be specified using objects, not raw names. ([4168](https://github.com/ElementsProject/lightning/pull/4168))
4746
- cli: scripts should filter out '^# ' or use `-N none`, as commands will start returning notifications soon ([4046](https://github.com/ElementsProject/lightning/pull/4046))
4847

4948
### Removed

external/libwally-core

Submodule libwally-core updated 182 files

lightningd/plugin.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,12 +1108,10 @@ static const char *plugin_hooks_add(struct plugin *plugin, const char *buffer,
11081108
name = json_strdup(tmpctx, buffer, nametok);
11091109
beforetok = json_get_member(buffer, t, "before");
11101110
aftertok = json_get_member(buffer, t, "after");
1111-
} else if (deprecated_apis) {
1111+
} else {
1112+
/* FIXME: deprecate in 3 releases after v0.9.2! */
11121113
name = json_strdup(tmpctx, plugin->buffer, t);
11131114
beforetok = aftertok = NULL;
1114-
} else {
1115-
return tal_fmt(plugin,
1116-
"hooks must be an array of objects");
11171115
}
11181116

11191117
hook = plugin_hook_register(plugin, name);

0 commit comments

Comments
 (0)