aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexis Enston <xn@outlook.com>2017-01-18 16:30:19 +0000
committerAlexis Enston <xn@outlook.com>2017-01-25 12:06:19 +0000
commit58e825060e02b2ccad2b15342382e323b64daabe (patch)
treeb714cdde18725d31982f641b837ac12f0b0c2f50 /src
parentBlockfill - Take TX fees into account properly (diff)
downloadmonero-58e825060e02b2ccad2b15342382e323b64daabe.tar.xz
Blockfill - Sort tx pool correctly
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/tx_pool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 77b3e70d2..f0d5d71bf 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, std::time_t>((double)blob_size / fee, receive_time), id);
+ m_txs_by_fee_and_receive_time.emplace(std::pair<double, std::time_t>(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, time_t>((double)tx.second.blob_size / tx.second.fee, tx.second.receive_time), tx.first);
+ m_txs_by_fee_and_receive_time.emplace(std::pair<double, time_t>(tx.second.fee / (double)tx.second.blob_size, tx.second.receive_time), tx.first);
}
// Ignore deserialization error