diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-03-25 08:42:42 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-03-25 08:42:42 +0200 |
commit | 01e0a69c175852adb01897431a138739faf39fe1 (patch) | |
tree | 9942b11a421e8743b179f341ca28c39f08843a92 /src/cryptonote_core/difficulty.cpp | |
parent | Merge pull request #756 (diff) | |
download | monero-01e0a69c175852adb01897431a138739faf39fe1.tar.xz |
Revert "Merge pull request #749"
This reverts commit 7fa63a82a1c3a0243f6757c1689855ed3ca61695, reversing
changes made to cb6be986c36b78eddb4b7f16e9ad440af8567dc4.
Diffstat (limited to 'src/cryptonote_core/difficulty.cpp')
-rw-r--r-- | src/cryptonote_core/difficulty.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cryptonote_core/difficulty.cpp b/src/cryptonote_core/difficulty.cpp index 54da77392..236e84481 100644 --- a/src/cryptonote_core/difficulty.cpp +++ b/src/cryptonote_core/difficulty.cpp @@ -116,8 +116,8 @@ namespace cryptonote { return !carry; } - difficulty_type next_difficulty(std::vector<std::uint64_t> timestamps, std::vector<difficulty_type> cumulative_difficulties, size_t target_seconds) { - + difficulty_type next_difficulty(vector<uint64_t> timestamps, vector<difficulty_type> cumulative_difficulties, size_t target_seconds) { + //cutoff DIFFICULTY_LAG if(timestamps.size() > DIFFICULTY_WINDOW) { timestamps.resize(DIFFICULTY_WINDOW); @@ -151,8 +151,6 @@ namespace cryptonote { assert(total_work > 0); uint64_t low, high; mul(total_work, target_seconds, low, high); - // blockchain errors "difficulty overhead" if this function returns zero. - // TODO: consider throwing an exception instead if (high != 0 || low + time_span - 1 < low) { return 0; } |