aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2026-04-22 17:32:39 +0000
committertobtoht <tob@featherwallet.org>2026-04-22 17:32:39 +0000
commit76448fbcb57e901b37c3c9cb822ba7645d6762d6 (patch)
treec38f0488b83e721009f4a1a123fd369e4e80306c /src
parent8b6be66bef8cce6e074074b7329be9509b93dbb8 (diff)
parente6ce535b24c48104fb1cfebc1ae03686afe820f2 (diff)
downloadmonzero-core-76448fbcb57e901b37c3c9cb822ba7645d6762d6.tar.gz
monzero-core-76448fbcb57e901b37c3c9cb822ba7645d6762d6.tar.xz
monzero-core-76448fbcb57e901b37c3c9cb822ba7645d6762d6.zip
Merge pull request #10420
e6ce535 zmq: add missing restricted rpc check (selsta)
Diffstat (limited to 'src')
-rw-r--r--src/rpc/daemon_handler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp
index 671889ddd..79479627c 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<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);