From ad1fb36b38065ef54a93f40bcb8da11e747041e4 Mon Sep 17 00:00:00 2001 From: selsta Date: Sat, 18 Apr 2026 17:36:21 +0200 Subject: [PATCH] zmq: add missing restricted rpc check (cherry picked from commit e6ce535b24c48104fb1cfebc1ae03686afe820f2) --- src/rpc/daemon_handler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index affe33958..520bc4dae 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -870,6 +870,13 @@ namespace rpc { try { + if (m_restricted && req.amounts != std::vector(1, 0)) + { + res.distributions.clear(); + res.status = Message::STATUS_FAILED; + res.error_details = "Restricted RPC can only get output distribution for rct outputs. Use your own node."; + return; + } res.distributions.reserve(req.amounts.size()); const uint64_t req_to_height = req.to_height ? req.to_height : (m_core.get_current_blockchain_height() - 1);