mirror of
https://codeberg.org/wownero/wownero.git
synced 2026-10-17 05:41:49 +02:00
zmq: add missing restricted rpc check
(cherry picked from commit e6ce535b24c48104fb1cfebc1ae03686afe820f2)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user