diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-01-29 15:09:17 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-01-29 17:21:11 +0000 |
| commit | 3b1d7e03fcc1caa8898ced33e127f6ba09d66df8 (patch) | |
| tree | dbec9bdbe5dc27b3c420433b99750ef036827489 /src/cryptonote_core/cryptonote_basic_impl.cpp | |
| parent | 60b064c7597c6cb6c5ff44c8d6a9abc82e00f525 (diff) | |
| download | monzero-core-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.tar.gz monzero-core-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.tar.xz monzero-core-3b1d7e03fcc1caa8898ced33e127f6ba09d66df8.zip | |
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
Diffstat (limited to 'src/cryptonote_core/cryptonote_basic_impl.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_basic_impl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptonote_core/cryptonote_basic_impl.cpp b/src/cryptonote_core/cryptonote_basic_impl.cpp index da14d772b..74f44e2af 100644 --- a/src/cryptonote_core/cryptonote_basic_impl.cpp +++ b/src/cryptonote_core/cryptonote_basic_impl.cpp @@ -74,8 +74,8 @@ namespace cryptonote { } //----------------------------------------------------------------------------------------------- bool get_block_reward(size_t median_size, size_t current_block_size, uint64_t already_generated_coins, uint64_t &reward, uint8_t version) { - static_assert(DIFFICULTY_TARGET%60==0&&DIFFICULTY_TARGET_V1%60==0,"difficulty targets must be a multiple of 60"); - const int target = version < 2 ? DIFFICULTY_TARGET_V1 : DIFFICULTY_TARGET; + static_assert(DIFFICULTY_TARGET_V2%60==0&&DIFFICULTY_TARGET_V1%60==0,"difficulty targets must be a multiple of 60"); + const int target = version < 2 ? DIFFICULTY_TARGET_V1 : DIFFICULTY_TARGET_V2; const int target_minutes = target / 60; const int emission_speed_factor = EMISSION_SPEED_FACTOR_PER_MINUTE - (target_minutes-1); @@ -85,7 +85,7 @@ namespace cryptonote { base_reward = FINAL_SUBSIDY_PER_MINUTE*target_minutes; } - uint64_t full_reward_zone = version < 2 ? CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1 : CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE; + uint64_t full_reward_zone = version < 2 ? CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1 : CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V2; //make it soft if (median_size < full_reward_zone) { |
