rpc: further restrict and clean up get_transaction_pool

This commit is contained in:
selsta
2026-08-25 19:29:30 +02:00
parent bc933f920f
commit a496b4981c
10 changed files with 28 additions and 73 deletions
+2 -6
View File
@@ -1358,14 +1358,10 @@ namespace cryptonote
{
RPC_TRACKER(get_transaction_pool);
const bool restricted = m_restricted && ctx;
const bool request_has_rpc_origin = ctx != NULL;
const bool allow_sensitive = !request_has_rpc_origin || !restricted;
size_t n_txes = m_core.get_pool_transactions_count(allow_sensitive);
size_t n_txes = m_core.get_pool_transactions_count(true);
if (n_txes > 0)
{
m_core.get_pool_transactions_and_spent_keys_info(res.transactions, res.spent_key_images, allow_sensitive);
m_core.get_pool_transactions_and_spent_keys_info(res.transactions, res.spent_key_images);
for (tx_info& txi : res.transactions)
txi.tx_blob = epee::string_tools::buff_to_hex_nodelimer(txi.tx_blob);
}