aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/block_reward.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 22:26:34 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 22:26:34 +0000
commit79beed221d9b3842b652587b5eaeed17423bd9de (patch)
treef5d9c1cbeab4519d1cf4ae64cfd15736528853d7 /tests/core_tests/block_reward.cpp
parenttests: fix some double spending tests (diff)
downloadmonero-79beed221d9b3842b652587b5eaeed17423bd9de.tar.xz
tests: fix various tests by using parameters better suited to monero
Either smaller coin values (as monero has smaller block rewards), or pre-hard fork values (full reward zone), or post-Bytecoin values (emission speed).
Diffstat (limited to 'tests/core_tests/block_reward.cpp')
-rw-r--r--tests/core_tests/block_reward.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/core_tests/block_reward.cpp b/tests/core_tests/block_reward.cpp
index 789c6fffa..fa06ed71e 100644
--- a/tests/core_tests/block_reward.cpp
+++ b/tests/core_tests/block_reward.cpp
@@ -80,7 +80,7 @@ namespace
generator.get_last_n_block_sizes(block_sizes, get_block_hash(blk_prev), median_block_count);
size_t median = misc_utils::median(block_sizes);
- median = std::max(median, static_cast<size_t>(CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE));
+ median = std::max(median, static_cast<size_t>(CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1));
transaction miner_tx;
bool r = construct_miner_tx_by_size(miner_tx, get_block_height(blk_prev) + 1, generator.get_already_generated_coins(blk_prev),
@@ -249,11 +249,11 @@ bool gen_block_reward::check_block_rewards(cryptonote::core& /*c*/, size_t /*ev_
DEFINE_TESTS_ERROR_CONTEXT("gen_block_reward_without_txs::check_block_rewards");
std::array<uint64_t, 7> blk_rewards;
- blk_rewards[0] = MONEY_SUPPLY >> 18;
+ blk_rewards[0] = MONEY_SUPPLY >> EMISSION_SPEED_FACTOR_PER_MINUTE;
uint64_t cumulative_reward = blk_rewards[0];
for (size_t i = 1; i < blk_rewards.size(); ++i)
{
- blk_rewards[i] = (MONEY_SUPPLY - cumulative_reward) >> 18;
+ blk_rewards[i] = (MONEY_SUPPLY - cumulative_reward) >> EMISSION_SPEED_FACTOR_PER_MINUTE;
cumulative_reward += blk_rewards[i];
}