Skip to content

Commit

Permalink
fix sync & tx validation sync problems linux/win
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoStehlik committed Jul 26, 2020
1 parent 27a2fb1 commit 754d8c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/config/CryptoNoteConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ namespace CryptoNote

const size_t FUSION_TX_MAX_SIZE = CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_CURRENT * 30 / 100;

const size_t FUSION_TX_MIN_INPUT_COUNT = 120;
const size_t FUSION_TX_MIN_INPUT_COUNT = 12;

const size_t FUSION_TX_MIN_IN_OUT_COUNT_RATIO = 14;
const size_t FUSION_TX_MIN_IN_OUT_COUNT_RATIO = 4;

const uint64_t FUSION_FEE_V1_HEIGHT = 2325000;

Expand All @@ -188,7 +188,7 @@ namespace CryptoNote
at any given time. Incoming fusion transactions that attempt to exceed this limit
will be rejected from the pool and will not be added. This mechanism is in place
to help curtail fusion transaction spam. */
const size_t FUSION_TX_MAX_POOL_COUNT = 420;
const size_t FUSION_TX_MAX_POOL_COUNT = 60;

/* We just set it output max to 90 */
const size_t NORMAL_TX_MAX_OUTPUT_COUNT_V1 = 90;
Expand Down
19 changes: 8 additions & 11 deletions src/cryptonotecore/Currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,17 @@ namespace CryptoNote
size_t Currency::maxBlockCumulativeSize(uint64_t height) const
{
assert(height <= std::numeric_limits<uint64_t>::max() / m_maxBlockSizeGrowthSpeedNumerator);
size_t maxSize = static_cast<size_t>(
m_maxBlockSizeInitial
+ (height * m_maxBlockSizeGrowthSpeedNumerator) / m_maxBlockSizeGrowthSpeedDenominator);
size_t maxSize = static_cast<size_t>(
m_maxBlockSizeInitial
+ (height * m_maxBlockSizeGrowthSpeedNumerator) / m_maxBlockSizeGrowthSpeedDenominator);
assert(maxSize >= m_maxBlockSizeInitial);
if (height >= CryptoNote::parameters::MAX_BLOCK_SIZE_V1_HEIGHT)
{
if (maxSize >= CryptoNote::parameters::MAX_BLOCK_SIZE_V1)
{
return CryptoNote::parameters::MAX_BLOCK_SIZE_V1;
}
else
{
return maxSize;
}
return maxSize = CryptoNote::parameters::MAX_BLOCK_SIZE_V1;
}
else
{
return maxSize;
}
}

Expand Down

0 comments on commit 754d8c1

Please sign in to comment.