aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_basic_impl.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-01-29 19:24:24 +0200
committerRiccardo Spagni <ric@spagni.net>2016-01-29 19:24:24 +0200
commitb91fc2dc3c4489f44a74915ae80fd1968d150302 (patch)
tree96f432c221f6edb336b65000acf30f0c45e3efa9 /src/cryptonote_core/cryptonote_basic_impl.cpp
parentbfb907c7044d56885e99b5e0b7086537b45f18fc (diff)
parent94b98fb5fa98ca317664b96d6a564159945de95e (diff)
downloadmonzero-core-b91fc2dc3c4489f44a74915ae80fd1968d150302.tar.gz
monzero-core-b91fc2dc3c4489f44a74915ae80fd1968d150302.tar.xz
monzero-core-b91fc2dc3c4489f44a74915ae80fd1968d150302.zip
Merge pull request #629
94b98fb tx_pool: do not accept txes not in a block if they timed out before (moneromooo-monero) eadbdf3 tx_pool: fix use of invalidated iterator (moneromooo-monero) 3b1d7e0 Fix V1/V2 use of hard fork related parameters (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/cryptonote_basic_impl.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_basic_impl.cpp6
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) {