mirror of
https://github.com/wownero/wownero.git
synced 2026-10-29 20:38:46 +01:00
rpc: redact txpool age in restricted mode
This commit is contained in:
@@ -2895,6 +2895,7 @@ namespace cryptonote
|
|||||||
{
|
{
|
||||||
RPC_TRACKER(get_txpool_backlog);
|
RPC_TRACKER(get_txpool_backlog);
|
||||||
|
|
||||||
|
const bool restricted = m_restricted && ctx;
|
||||||
if (!m_core.get_txpool_backlog(res.backlog))
|
if (!m_core.get_txpool_backlog(res.backlog))
|
||||||
{
|
{
|
||||||
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
|
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
|
||||||
@@ -2902,6 +2903,10 @@ namespace cryptonote
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (restricted)
|
||||||
|
for (tx_backlog_entry& entry : res.backlog)
|
||||||
|
entry.time_in_pool = 0;
|
||||||
|
|
||||||
res.status = CORE_RPC_STATUS_OK;
|
res.status = CORE_RPC_STATUS_OK;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user