From 8aa660e9381edbdf215357e1b4418b6975f67db9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 15 Sep 2020 14:23:11 +0930 Subject: [PATCH] lightningd: remove deprecated return for `db_write` hook. Changelog-Removed: JSON API: The hook `db_write` can no longer return `true` (deprecated in 0.8.1) Signed-off-by: Rusty Russell --- lightningd/plugin_hook.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/lightningd/plugin_hook.c b/lightningd/plugin_hook.c index 2d32d9f6f..155152396 100644 --- a/lightningd/plugin_hook.c +++ b/lightningd/plugin_hook.c @@ -299,33 +299,6 @@ static void db_hook_response(const char *buffer, const jsmntok_t *toks, fatal("Plugin returned an invalid response to the db_write " "hook: %s", buffer); -#ifdef COMPAT_V080 - /* For back-compatibility we allow to return a simple Boolean true. */ - if (deprecated_apis) { - bool resp; - if (json_to_bool(buffer, resulttok, &resp)) { - static bool warned = false; - /* If it fails, we must not commit to our db. */ - if (!resp) - fatal("Plugin returned failed db_write: %s.", - buffer); - if (!warned) { - warned = true; - log_unusual(ph_req->db->log, - "Plugin returned 'true' to " - "'db_hook'. " - "This is now deprecated and " - "you should return " - "{'result': 'continue'} " - "instead."); - } - /* Resume. */ - io_break(ph_req); - return; - } - } -#endif /* defined(COMPAT_V080) */ - /* We expect result: { 'result' : 'continue' }. * Anything else we abort. */