mirror of
https://github.com/wownero/wownero.git
synced 2026-11-14 04:13:54 +01:00
Merge pull request #11146
92c8206rpc: redact txpool age in restricted mode (selsta)265f7b2txpool: fix time_in_pool age calculation (selsta) ACKs: tobtoht, jpk68
This commit is contained in:
@@ -2863,6 +2863,7 @@ namespace cryptonote
|
||||
{
|
||||
RPC_TRACKER(get_txpool_backlog);
|
||||
|
||||
const bool restricted = m_restricted && ctx;
|
||||
if (!m_core.get_txpool_backlog(res.backlog))
|
||||
{
|
||||
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
|
||||
@@ -2870,6 +2871,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