From 9df85e80ef70107f028f31d7edac8e3db8334c38 Mon Sep 17 00:00:00 2001 From: valiant1x Date: Fri, 10 Nov 2017 21:24:06 -0500 Subject: [PATCH] fix typo (variable name to every N block from every N tx) --- src/CryptoNoteConfig.h | 2 +- src/CryptoNoteCore/Currency.cpp | 6 +++--- src/CryptoNoteCore/Currency.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CryptoNoteConfig.h b/src/CryptoNoteConfig.h index 93557dcd80..c055edc397 100644 --- a/src/CryptoNoteConfig.h +++ b/src/CryptoNoteConfig.h @@ -59,7 +59,7 @@ static_assert(2 * DIFFICULTY_CUT <= DIFFICULTY_WINDOW - 2, "Bad DIFFICULTY_WINDO const size_t MAX_BLOCK_SIZE_INITIAL = 20 * 1024; const uint64_t MAX_BLOCK_SIZE_GROWTH_SPEED_NUMERATOR = 100 * 1024; const uint64_t MAX_BLOCK_SIZE_GROWTH_SPEED_NUMERATOR_V2 = 35 * 100 * 1024; -const size_t MAX_BLOCK_SIZE_ALLOWED_EVERY_N_TX = 5; +const size_t MAX_BLOCK_SIZE_ALLOWED_EVERY_N_BLOCK = 5; const uint64_t MAX_BLOCK_SIZE_GROWTH_SPEED_DENOMINATOR = 365 * 24 * 60 * 60 / DIFFICULTY_TARGET; const uint64_t CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS = 1; diff --git a/src/CryptoNoteCore/Currency.cpp b/src/CryptoNoteCore/Currency.cpp index 69d49bd238..4f9996a72c 100755 --- a/src/CryptoNoteCore/Currency.cpp +++ b/src/CryptoNoteCore/Currency.cpp @@ -175,7 +175,7 @@ bool Currency::getBlockReward(uint8_t blockMajorVersion, size_t medianSize, size size_t Currency::maxBlockCumulativeSize(uint64_t height) const { assert(height <= std::numeric_limits::max() / m_maxBlockSizeGrowthSpeedNumerator); bool allowLargeBlockSize = false; - if (height >= m_upgradeHeightMaxBlockSize && height % m_maxBlockSizeAllowedEveryNTx == 0) + if (height >= m_upgradeHeightMaxBlockSize && height % m_maxBlockSizeAllowedEveryNBlock == 0) allowLargeBlockSize = true; size_t maxSize = static_cast(m_maxBlockSizeInitial + @@ -558,7 +558,7 @@ m_difficultyLag(currency.m_difficultyLag), m_difficultyCut(currency.m_difficultyCut), m_maxBlockSizeInitial(currency.m_maxBlockSizeInitial), m_maxBlockSizeGrowthSpeedNumeratorV2(currency.m_maxBlockSizeGrowthSpeedNumeratorV2), -m_maxBlockSizeAllowedEveryNTx(currency.m_maxBlockSizeAllowedEveryNTx), +m_maxBlockSizeAllowedEveryNBlock(currency.m_maxBlockSizeAllowedEveryNBlock), m_maxBlockSizeGrowthSpeedNumerator(currency.m_maxBlockSizeGrowthSpeedNumerator), m_maxBlockSizeGrowthSpeedDenominator(currency.m_maxBlockSizeGrowthSpeedDenominator), m_lockedTxAllowedDeltaSeconds(currency.m_lockedTxAllowedDeltaSeconds), @@ -612,7 +612,7 @@ CurrencyBuilder::CurrencyBuilder(Logging::ILogger& log) : m_currency(log) { difficultyCut(parameters::DIFFICULTY_CUT); maxBlockSizeInitial(parameters::MAX_BLOCK_SIZE_INITIAL); - maxBlockSizeAllowedEveryNTx(parameters::MAX_BLOCK_SIZE_ALLOWED_EVERY_N_TX); + maxBlockSizeAllowedEveryNBlock(parameters::MAX_BLOCK_SIZE_ALLOWED_EVERY_N_BLOCK); maxBlockSizeGrowthSpeedNumeratorV2(parameters::MAX_BLOCK_SIZE_GROWTH_SPEED_NUMERATOR_V2); maxBlockSizeGrowthSpeedNumerator(parameters::MAX_BLOCK_SIZE_GROWTH_SPEED_NUMERATOR); maxBlockSizeGrowthSpeedDenominator(parameters::MAX_BLOCK_SIZE_GROWTH_SPEED_DENOMINATOR); diff --git a/src/CryptoNoteCore/Currency.h b/src/CryptoNoteCore/Currency.h index b04121e66c..bbc40493b6 100755 --- a/src/CryptoNoteCore/Currency.h +++ b/src/CryptoNoteCore/Currency.h @@ -166,7 +166,7 @@ class Currency { size_t m_maxBlockSizeInitial; uint64_t m_maxBlockSizeGrowthSpeedNumeratorV2; - size_t m_maxBlockSizeAllowedEveryNTx; + size_t m_maxBlockSizeAllowedEveryNBlock; uint64_t m_maxBlockSizeGrowthSpeedNumerator; uint64_t m_maxBlockSizeGrowthSpeedDenominator; @@ -245,7 +245,7 @@ class CurrencyBuilder : boost::noncopyable { CurrencyBuilder& maxBlockSizeInitial(size_t val) { m_currency.m_maxBlockSizeInitial = val; return *this; } CurrencyBuilder& maxBlockSizeGrowthSpeedNumerator(uint64_t val) { m_currency.m_maxBlockSizeGrowthSpeedNumerator = val; return *this; } - CurrencyBuilder& maxBlockSizeAllowedEveryNTx(uint64_t val) { m_currency.m_maxBlockSizeAllowedEveryNTx = val; return *this; } + CurrencyBuilder& maxBlockSizeAllowedEveryNBlock(uint64_t val) { m_currency.m_maxBlockSizeAllowedEveryNBlock = val; return *this; } CurrencyBuilder& maxBlockSizeGrowthSpeedNumeratorV2(uint64_t val) { m_currency.m_maxBlockSizeGrowthSpeedNumeratorV2 = val; return *this; } CurrencyBuilder& maxBlockSizeGrowthSpeedDenominator(uint64_t val) { m_currency.m_maxBlockSizeGrowthSpeedDenominator = val; return *this; }