zmq: add missing restricted rpc check

(cherry picked from commit e6ce535b24c48104fb1cfebc1ae03686afe820f2)
This commit is contained in:
selsta
2026-05-05 18:20:53 -04:00
committed by jwinterm
parent c7227454e8
commit ad1fb36b38
+7
View File
@@ -870,6 +870,13 @@ namespace rpc
{
try
{
if (m_restricted && req.amounts != std::vector<uint64_t>(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);