diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 77b3e70d..f0d5d71b 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -253,7 +253,7 @@ namespace cryptonote tvc.m_verifivation_failed = false; - m_txs_by_fee_and_receive_time.emplace(std::pair((double)blob_size / fee, receive_time), id); + m_txs_by_fee_and_receive_time.emplace(std::pair(fee / (double)blob_size, receive_time), id); return true; } @@ -732,7 +732,7 @@ namespace cryptonote // no need to store queue of sorted transactions, as it's easy to generate. for (const auto& tx : m_transactions) { - m_txs_by_fee_and_receive_time.emplace(std::pair((double)tx.second.blob_size / tx.second.fee, tx.second.receive_time), tx.first); + m_txs_by_fee_and_receive_time.emplace(std::pair(tx.second.fee / (double)tx.second.blob_size, tx.second.receive_time), tx.first); } // Ignore deserialization error