mirror of
https://github.com/wownero/wownero.git
synced 2026-11-14 04:13:54 +01:00
rpc: further restrict and clean up get_transaction_pool
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user