mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-10 13:13:27 +01:00
dynamic tx size scaling for tx mempool
This commit is contained in:
parent
e995a7777a
commit
328a52a543
@ -361,6 +361,17 @@ namespace cryptonote
|
||||
// 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;
|
||||
|
||||
// Calculate size limit based on median too; useful
|
||||
// for when we actually fix wallet2.h's maximum
|
||||
// allowable tx size
|
||||
//
|
||||
// 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;
|
||||
if (upper_transaction_size_limit_median > upper_transaction_size_limit)
|
||||
upper_transaction_size_limit = upper_transaction_size_limit_median;
|
||||
|
||||
BOOST_FOREACH(transactions_container::value_type& tx, m_transactions)
|
||||
{
|
||||
// Can not exceed maximum block size
|
||||
|
Loading…
Reference in New Issue
Block a user