Skip to content

Commit

Permalink
Possible hotfix for Mempool problem
Browse files Browse the repository at this point in the history
  • Loading branch information
ExploShot committed Mar 28, 2021
1 parent d43147f commit ed9f1e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions lib/CryptoNoteCore/TransactionPool.cpp
Expand Up @@ -486,6 +486,7 @@ bool tx_memory_pool::fill_block_template(

total_size = 0;
fee = 0;
uint8_t maxTxCount = 125;

size_t max_total_size = (125 * median_size) / 100;
max_total_size = std::min(max_total_size, maxCumulativeSize) - m_currency.minerTxBlobReservedSize();
Expand All @@ -495,6 +496,10 @@ bool tx_memory_pool::fill_block_template(
for (auto it = m_fee_index.rbegin(); it != m_fee_index.rend() && it->fee == 0; ++it) {
const auto &txd = *it;

if (blockTemplate.getTransactions().size() > maxTxCount) {
break;
}

if (m_ttlIndex.count(txd.id) > 0) {
continue;
}
Expand All @@ -514,6 +519,10 @@ bool tx_memory_pool::fill_block_template(
for (auto i = m_fee_index.begin(); i != m_fee_index.end(); ++i) {
const auto &txd = *i;

if (blockTemplate.getTransactions().size() > maxTxCount) {
break;
}

if (m_ttlIndex.count(txd.id) > 0) {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Global/version.h.in
Expand Up @@ -6,8 +6,8 @@
#define PROJECT_COPYRIGHT "@PROJECT_COPYRIGHT@"
#define APP_VER_MAJOR 6
#define APP_VER_MINOR 0
#define APP_VER_REV 4
#define APP_VER_BUILD 6075
#define APP_VER_REV 5
#define APP_VER_BUILD 6080

#define BUILD_COMMIT_ID "@PROJECT_GIT_COMMIT_ID@"
#define PROJECT_VERSION STR(APP_VER_MAJOR) "." STR(APP_VER_MINOR) "." STR(APP_VER_REV)
Expand Down

0 comments on commit ed9f1e2

Please sign in to comment.