mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
zmq: apply restricted-mode privacy filtering to get_transaction_pool
Add an include_sensitive parameter to tx_memory_pool::get_pool_for_rpc (and its core passthrough), mirroring the include_sensitive_data parameter on the HTTP analog get_transactions_and_spent_keys_info. When false, receive_time and last_relayed_time are zeroed using the same masking already applied on the HTTP path. The ZMQ handler in daemon_handler.cpp passes !m_restricted, so --restricted-zmq-rpc callers now receive the same privacy-filtered view as restricted HTTP callers instead of the unfiltered timing metadata they previously got. Stem-phase txs continue to be excluded regardless (relay_category::broadcasted filter unchanged). Refs #10529. (cherry picked from commit 878c781764e62d8616ae49a42baf05366a1d7336)
This commit is contained in:
@@ -455,7 +455,7 @@ bool txpool_double_spend_base::check_changed(cryptonote::core& c, const size_t e
|
||||
{
|
||||
std::vector<cryptonote::rpc::tx_in_pool> infos{};
|
||||
cryptonote::rpc::key_images_with_tx_hashes key_images{};
|
||||
if (!c.get_pool_for_rpc(infos, key_images) || infos.size() != m_broadcasted_hashes.size() || key_images.size() != m_broadcasted_hashes.size())
|
||||
if (!c.get_pool_for_rpc(infos, key_images, true) || infos.size() != m_broadcasted_hashes.size() || key_images.size() != m_broadcasted_hashes.size())
|
||||
{
|
||||
MERROR("Expected broadcasted rpc data to return " << m_broadcasted_hashes.size() << " but got " << infos.size() << " infos and " << key_images.size() << "key images");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user