topology: fix overzealous deprecation check in listpeerchannels.

It's an output field (which we don't complain about), not an input field!

Fixes: https://github.com/ElementsProject/lightning/issues/7652
Changelog-Fixed: Logging: removed bogus "**BROKEN** plugin-topology: DEPRECATED API USED: listchannels.include_private" message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-09-13 10:53:50 +09:30
parent 7e2ea3ed04
commit bfe0557f0b
2 changed files with 1 additions and 2 deletions

View file

@ -394,7 +394,7 @@ static struct command_result *listpeerchannels_done(struct command *cmd,
struct gossmap_localmods *mods;
/* In deprecated mode, re-add private channels */
if (command_deprecated_in_ok(cmd, "include_private", "v24.02", "v24.08")) {
if (command_deprecated_out_ok(cmd, "include_private", "v24.02", "v24.08")) {
connected = local_connected(opts, buf, result);
mods = gossmods_from_listpeerchannels(tmpctx, &local_id,
buf, result, false,

View file

@ -4417,7 +4417,6 @@ def test_sql_crash(node_factory, bitcoind):
l1.rpc.sql(f"SELECT * FROM peerchannels;")
@pytest.mark.xfail(strict=True)
def test_listchannels_broken_message(node_factory):
"""This gave a bogus BROKEN message with deprecated-apis enabled"""
l1 = node_factory.get_node(options={'allow-deprecated-apis': True})