From c6432ac2ee3769475cee3017b489b936fd9a1761 Mon Sep 17 00:00:00 2001 From: Javier Smooth Date: Mon, 27 Jul 2015 01:14:03 -0700 Subject: [PATCH] lower mining priority for anon-impairing (<2 mixins) tx --- src/cryptonote_core/tx_pool.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index a78e79b..6f67464 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -423,6 +423,15 @@ namespace cryptonote BOOST_FOREACH(transactions_container::value_type& tx, m_transactions) { + if (tx.second.tx.vin.size() > 0) + { + CHECKED_GET_SPECIFIC_VARIANT(tx.second.tx.vin[0], const txin_to_key, itk, false); + + // discourage < 3-way-mix transactions by mining them only as the first tx in an empty block + if (itk.key_offsets.size() < 3 && total_size > 0) + continue; + } + // Can not exceed maximum block size if (max_total_size < total_size + tx.second.blob_size) continue;