From 6a1a66c180cba5f2d4189e89327de23505c7f4dd Mon Sep 17 00:00:00 2001 From: will Date: Tue, 3 Mar 2026 21:04:38 +0000 Subject: [PATCH] rpc: render Type::ANY in help text instead of aborting RPCResult::Type::ANY triggers NONFATAL_UNREACHABLE() in ToSections(), which crashes the help() RPC when a command uses Type::ANY in a nested result field. Previously this was never hit because Type::ANY was only used as a top-level alternate result type, filtered out before ToSections() is called. getopenrpcinfo() will use this result type, so render it like other types allowing it to be used in nested result definitions like schema. --- src/rpc/util.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 410bb741c15..8c5ee303626 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -1032,7 +1032,8 @@ void RPCResult::ToSections(Sections& sections, const OuterType outer_type, const switch (m_type) { case Type::ANY: { - NONFATAL_UNREACHABLE(); // Only for testing + sections.PushSection({indent + maybe_key + "xxx" + maybe_separator, Description("any")}); + return; } case Type::NONE: { sections.PushSection({indent + "null" + maybe_separator, Description("json null")});