mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
rpc: redact txpool age in restricted mode
(cherry picked from commit b4c8385fd382f14419e54c6f1c3800a1642360fd)
This commit is contained in:
@@ -3336,6 +3336,7 @@ namespace cryptonote
|
||||
size_t n_txes = m_core.get_pool_transactions_count();
|
||||
CHECK_PAYMENT_MIN1(req, res, COST_PER_TX_POOL_STATS * n_txes, false);
|
||||
|
||||
const bool restricted = m_restricted && ctx;
|
||||
if (!m_core.get_txpool_backlog(res.backlog))
|
||||
{
|
||||
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
|
||||
@@ -3343,6 +3344,10 @@ namespace cryptonote
|
||||
return false;
|
||||
}
|
||||
|
||||
if (restricted)
|
||||
for (tx_backlog_entry& entry : res.backlog)
|
||||
entry.time_in_pool = 0;
|
||||
|
||||
res.status = CORE_RPC_STATUS_OK;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user