lightningd: remove deprecated behavior where checkmessage would fail quietly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: JSON-RPC: `checkmessage` now always returns an error when the pubkey is not specified and it is unknown in the network graph (deprecated v0.12.0)
This commit is contained in:
Rusty Russell
2023-03-14 15:47:50 +10:30
parent 1c4f6ab2c5
commit 06b9009dd8
2 changed files with 13 additions and 9 deletions

View File

@@ -134,9 +134,10 @@ static void listnodes_done(const char *buffer,
if (t)
t = json_get_member(buffer, t, "nodes");
if (!deprecated_apis && (!t || t->size == 0)) {
response = json_stream_fail(can->cmd, SIGNMESSAGE_PUBKEY_NOT_FOUND,
"pubkey not found in the graph");
if (!t || t->size == 0) {
response = json_stream_fail(can->cmd,
SIGNMESSAGE_PUBKEY_NOT_FOUND,
"pubkey not found in the graph");
json_add_node_id(response, "claimed_key", &can->id);
json_object_end(response);
was_pending(command_failed(can->cmd, response));