Skip to content

Commit

Permalink
fix typo (variable name to every N block from every N tx)
Browse files Browse the repository at this point in the history
  • Loading branch information
valiant1x committed Nov 11, 2017
1 parent a0d6ec5 commit 9df85e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/CryptoNoteConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/CryptoNoteCore/Currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint64_t>::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<size_t>(m_maxBlockSizeInitial +
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/CryptoNoteCore/Currency.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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; }

Expand Down

0 comments on commit 9df85e8

Please sign in to comment.