Skip to content
This repository was archived by the owner on Sep 26, 2018. It is now read-only.

Commit c7822d8

Browse files
author
crappyrules
authored
Merge pull request #2 from monkeytips/dumbassville
if at first you don't succeed, use a bigger shovel
2 parents d49adfa + d695a8a commit c7822d8

3 files changed

Lines changed: 9 additions & 22 deletions

File tree

src/CryptoNoteConfig.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,19 @@ const uint64_t MINIMUM_MIXIN_V1 = 0;
6363
const uint64_t MAXIMUM_MIXIN_V1 = 7;
6464
const uint64_t MINIMUM_MIXIN_V2 = 7;
6565
const uint64_t MAXIMUM_MIXIN_V2 = 7;
66-
const uint64_t MINIMUM_MIXIN_V3 = 3;
67-
const uint64_t MAXIMUM_MIXIN_V3 = 3;
68-
const uint64_t MINIMUM_MIXIN_V4 = 0;
69-
const uint64_t MAXIMUM_MIXIN_V4 = 3;
66+
const uint64_t MINIMUM_MIXIN_V3 = 0;
67+
const uint64_t MAXIMUM_MIXIN_V3 = 7;
7068

7169
const uint32_t MIXIN_LIMITS_V1_HEIGHT = 40;
7270
const uint32_t MIXIN_LIMITS_V2_HEIGHT = 60;
73-
const uint32_t MIXIN_LIMITS_V3_HEIGHT = 93333;
74-
const uint64_t MIXIN_LIMITS_V4_HEIGHT = 100000;
71+
const uint32_t MIXIN_LIMITS_V3_HEIGHT = 101000;
7572

76-
const uint64_t DEFAULT_MIXIN = MINIMUM_MIXIN_V4;
73+
const uint64_t DEFAULT_MIXIN = MAXIMUM_MIXIN_V3;
7774

7875
const uint64_t DEFAULT_DUST_THRESHOLD = UINT64_C(10);
7976
const uint64_t DEFAULT_DUST_THRESHOLD_V2 = UINT64_C(10);
8077

81-
const uint32_t DUST_THRESHOLD_V2_HEIGHT = MIXIN_LIMITS_V4_HEIGHT;
78+
const uint32_t DUST_THRESHOLD_V2_HEIGHT = MIXIN_LIMITS_V3_HEIGHT;
8279

8380
const uint64_t EXPECTED_NUMBER_OF_BLOCKS_PER_DAY = 24 * 60 * 60 / DIFFICULTY_TARGET;
8481
const size_t DIFFICULTY_WINDOW = 17;
@@ -112,7 +109,7 @@ const uint32_t KEY_IMAGE_CHECKING_BLOCK_INDEX = 0;
112109
const uint32_t UPGRADE_HEIGHT_V2 = 1;
113110
const uint32_t UPGRADE_HEIGHT_V3 = 2;
114111
const uint32_t UPGRADE_HEIGHT_V4 = 3; // Upgrade height for CN-Lite Variant 1 switch.
115-
const uint32_t UPGRADE_HEIGHT_CURRENT = UPGRADE_HEIGHT_V4;
112+
const uint32_t UPGRADE_HEIGHT_CURRENT = UPGRADE_HEIGHT_V3;
116113
const unsigned UPGRADE_VOTING_THRESHOLD = 90; // percent
117114
const uint32_t UPGRADE_VOTING_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks
118115
const uint32_t UPGRADE_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks
@@ -126,7 +123,7 @@ const uint8_t CURRENT_FORK_INDEX = 4;
126123

127124
/* Block heights we are going to have hard forks at */
128125
const uint64_t FORK_HEIGHTS[] = {
129-
100000,
126+
101000,
130127
187000,
131128
350000,
132129
440000,

src/CryptoNoteCore/Core.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -958,12 +958,7 @@ bool Core::validateMixin(const std::vector<CachedTransaction> transactions,
958958
/* We also need to ensure that the mixin enforced is for the limit that
959959
was correct when the block was formed - i.e. if 0 mixin was allowed at
960960
block 100, but is no longer allowed - we should still validate block 100 */
961-
if (height >= CryptoNote::parameters::MIXIN_LIMITS_V4_HEIGHT)
962-
{
963-
minMixin = CryptoNote::parameters::MINIMUM_MIXIN_V4;
964-
maxMixin = CryptoNote::parameters::MAXIMUM_MIXIN_V4;
965-
}
966-
else if (height >= CryptoNote::parameters::MIXIN_LIMITS_V3_HEIGHT)
961+
if (height >= CryptoNote::parameters::MIXIN_LIMITS_V3_HEIGHT)
967962
{
968963
minMixin = CryptoNote::parameters::MINIMUM_MIXIN_V3;
969964
maxMixin = CryptoNote::parameters::MAXIMUM_MIXIN_V3;

src/PaymentGate/WalletService.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,7 @@ void validateMixin(const uint32_t mixin, const uint32_t height, Logging::LoggerR
286286
uint64_t minMixin = 0;
287287
uint64_t maxMixin = std::numeric_limits<uint64_t>::max();
288288

289-
if (height >= CryptoNote::parameters::MIXIN_LIMITS_V4_HEIGHT)
290-
{
291-
minMixin = CryptoNote::parameters::MINIMUM_MIXIN_V4;
292-
maxMixin = CryptoNote::parameters::MAXIMUM_MIXIN_V4;
293-
}
294-
else if (height >= CryptoNote::parameters::MIXIN_LIMITS_V3_HEIGHT)
289+
if (height >= CryptoNote::parameters::MIXIN_LIMITS_V3_HEIGHT)
295290
{
296291
minMixin = CryptoNote::parameters::MINIMUM_MIXIN_V3;
297292
maxMixin = CryptoNote::parameters::MAXIMUM_MIXIN_V3;

0 commit comments

Comments
 (0)