mirror of
https://github.com/monero-project/monero.git
synced 2026-04-28 11:53:17 -07:00
zmq: add missing restricted rpc check
This commit is contained in:
@@ -861,6 +861,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);
|
||||
|
||||
Reference in New Issue
Block a user