diff options
| author | tobtoht <tob@featherwallet.org> | 2026-06-09 18:00:03 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2026-06-09 18:00:03 +0000 |
| commit | 70d57adc4b08c39e391468369f1a29a532fb9a8e (patch) | |
| tree | eabdf246cccc21180383eb1844624cce7c92af8e /src/cryptonote_core/tx_pool.cpp | |
| parent | c6e5759f31a3d37be86f1da762401cc9d1ba7c7f (diff) | |
| parent | 878c781764e62d8616ae49a42baf05366a1d7336 (diff) | |
| download | monzero-core-70d57adc4b08c39e391468369f1a29a532fb9a8e.tar.gz monzero-core-70d57adc4b08c39e391468369f1a29a532fb9a8e.tar.xz monzero-core-70d57adc4b08c39e391468369f1a29a532fb9a8e.zip | |
Merge pull request #10543
878c781 zmq: apply restricted-mode privacy filtering to get_transaction_pool (greatjourney589)
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
| -rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index aec0b64f4..8af654185 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -1241,13 +1241,13 @@ namespace cryptonote return true; } //--------------------------------------------------------------------------------- - bool tx_memory_pool::get_pool_for_rpc(std::vector<cryptonote::rpc::tx_in_pool>& tx_infos, cryptonote::rpc::key_images_with_tx_hashes& key_image_infos) const + bool tx_memory_pool::get_pool_for_rpc(std::vector<cryptonote::rpc::tx_in_pool>& tx_infos, cryptonote::rpc::key_images_with_tx_hashes& key_image_infos, bool include_sensitive) const { CRITICAL_REGION_LOCAL(m_transactions_lock); CRITICAL_REGION_LOCAL1(m_blockchain); tx_infos.reserve(m_blockchain.get_txpool_tx_count()); key_image_infos.reserve(m_blockchain.get_txpool_tx_count()); - m_blockchain.for_all_txpool_txes([&tx_infos, key_image_infos](const crypto::hash &txid, const txpool_tx_meta_t &meta, const cryptonote::blobdata_ref *bd){ + m_blockchain.for_all_txpool_txes([&tx_infos, key_image_infos, include_sensitive](const crypto::hash &txid, const txpool_tx_meta_t &meta, const cryptonote::blobdata_ref *bd){ cryptonote::rpc::tx_in_pool txi; txi.tx_hash = txid; if (!(meta.pruned ? parse_and_validate_tx_base_from_blob(*bd, txi.tx) : parse_and_validate_tx_from_blob(*bd, txi.tx))) @@ -1265,9 +1265,11 @@ namespace cryptonote txi.max_used_block_hash = meta.max_used_block_id; txi.last_failed_block_height = meta.last_failed_height; txi.last_failed_block_hash = meta.last_failed_id; - txi.receive_time = meta.receive_time; + // In restricted mode we do not include this data: + txi.receive_time = include_sensitive ? meta.receive_time : 0; txi.relayed = meta.relayed; - txi.last_relayed_time = meta.dandelionpp_stem ? 0 : meta.last_relayed_time; + // In restricted mode we do not include this data: + txi.last_relayed_time = (include_sensitive && !meta.dandelionpp_stem) ? meta.last_relayed_time : 0; txi.do_not_relay = meta.do_not_relay; txi.double_spend_seen = meta.double_spend_seen; tx_infos.push_back(txi); |
