Skip to content

Commit 1334c6e

Browse files
authored
Merge pull request #10 from LIMXTEC/0.9.8.0
Update mega-mec.h
2 parents 365b6e8 + e70b07a commit 1334c6e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/crypto/mega-mec.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern "C" {
3535
}
3636
#include <crypto/lyra2.h>
3737

38-
#define HASH_FUNC_BASE_TIMESTAMP 1370079299 // Megacoin Block 1
38+
#define HASH_FUNC_BASE_TIMESTAMP_1 1370079299 // Megacoin Block 1
3939
#define HASH_FUNC_COUNT_1 8
4040
#define HASH_FUNC_COUNT_2 8
4141
#define HASH_FUNC_COUNT_3 7
@@ -90,17 +90,17 @@ inline uint256 Mega_Mec(const T1 pbegin, const T1 pend,uint32_t timestamp)
9090
permutation_3[i] = i;
9191
}
9292

93-
uint32_t steps_1 = (timestamp - HASH_FUNC_BASE_TIMESTAMP) % HASH_FUNC_COUNT_PERMUTATIONS_7;
93+
uint32_t steps_1 = (timestamp - HASH_FUNC_BASE_TIMESTAMP_1) % HASH_FUNC_COUNT_PERMUTATIONS_7;
9494
for (uint32_t i = 0; i < steps_1; i++) {
9595
std::next_permutation(permutation_1, permutation_1 + HASH_FUNC_COUNT_1);
9696
}
9797

98-
uint32_t steps_2 = (timestamp+ HASH_FUNC_VAR_1 - HASH_FUNC_BASE_TIMESTAMP) % HASH_FUNC_COUNT_PERMUTATIONS;
98+
uint32_t steps_2 = (timestamp+ HASH_FUNC_VAR_1 - HASH_FUNC_BASE_TIMESTAMP_1) % HASH_FUNC_COUNT_PERMUTATIONS;
9999
for (uint32_t i = 0; i < steps_2; i++) {
100100
std::next_permutation(permutation_2 + HASH_FUNC_COUNT_1, permutation_2 + HASH_FUNC_COUNT_1 + HASH_FUNC_COUNT_2);
101101
}
102102

103-
uint32_t steps_3 = (timestamp+ HASH_FUNC_VAR_2 - HASH_FUNC_BASE_TIMESTAMP) % HASH_FUNC_COUNT_PERMUTATIONS_7;
103+
uint32_t steps_3 = (timestamp+ HASH_FUNC_VAR_2 - HASH_FUNC_BASE_TIMESTAMP_1) % HASH_FUNC_COUNT_PERMUTATIONS_7;
104104
for (uint32_t i = 0; i < steps_3; i++) {
105105
std::next_permutation(permutation_3 + HASH_FUNC_COUNT_1 + HASH_FUNC_COUNT_2, permutation_3 + HASH_FUNC_COUNT_1 + HASH_FUNC_COUNT_2 + HASH_FUNC_COUNT_3);
106106
}

0 commit comments

Comments
 (0)