aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormydesktop <dev.mc2@gmail.com>2014-05-27 16:45:50 -0400
committermydesktop <dev.mc2@gmail.com>2014-05-27 16:45:50 -0400
commit976152994135592bb37db3d8bee6189238c1c071 (patch)
tree70b21ea9b6c9e13cf1b18ec9fec40664ceea167b /src/cryptonote_core
parentdynamic tx size scaling for tx mempool (diff)
downloadmonero-976152994135592bb37db3d8bee6189238c1c071.tar.xz
fix typing mismatch
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/tx_pool.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 5eb99db40..294cfc254 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -350,6 +350,10 @@ namespace cryptonote
//---------------------------------------------------------------------------------
bool tx_memory_pool::fill_block_template(block &bl, size_t median_size, uint64_t already_generated_coins, size_t &total_size, uint64_t &fee)
{
+ // Warning: This function takes already_generated_
+ // coins as an argument and appears to do nothing
+ // with it.
+
CRITICAL_REGION_LOCAL(m_transactions_lock);
total_size = 0;
@@ -359,7 +363,10 @@ namespace cryptonote
std::unordered_set<crypto::key_image> k_images;
// Tx size limit as in wallet2.h
- uint64_t upper_transaction_size_limit = ((CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE * 125) / 100) - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
+ // tx_pool.cpp uses uint64_t for tx sizes, whereas
+ // wallet2.h uses uint64_t; just use size_t here
+ // for now
+ size_t upper_transaction_size_limit = ((CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE * 125) / 100) - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
// Calculate size limit based on median too; useful
// for when we actually fix wallet2.h's maximum
@@ -368,7 +375,7 @@ namespace cryptonote
// Can be removed when wallet2.h calculates max
// tx size based on the median too; just use
// upper_transaction_size_limit_median in all cases
- uint64_t upper_transaction_size_limit_median = ((median_size * 125) / 100) - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
+ size_t upper_transaction_size_limit_median = ((median_size * 125) / 100) - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
if (upper_transaction_size_limit_median > upper_transaction_size_limit)
upper_transaction_size_limit = upper_transaction_size_limit_median;