diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-12-26 10:21:21 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-12-26 10:23:17 +0200 |
commit | 95ceb715dc875823f56f930d12a08c349874ce19 (patch) | |
tree | c37d90d5085f3ae0e727490f5ca2700d678898e3 /tests/core_tests/block_reward.cpp | |
parent | Merge pull request #564 (diff) | |
parent | tests: fix various tests by using parameters better suited to monero (diff) | |
download | monero-95ceb715dc875823f56f930d12a08c349874ce19.tar.xz |
Merge pull request #565
79beed2 tests: fix various tests by using parameters better suited to monero (moneromooo-monero)
d0a8362 tests: fix some double spending tests (moneromooo-monero)
2358d0d tests: use 255 as a "too high" block version (moneromooo-monero)
f33a88c blockchain: fix a few block addition bugs (moneromooo-monero)
a9ff11c blockchain: fix an off by one error in unlocked time check (moneromooo-monero)
f294be3 blockchain: reinstate double spending checks in check_tx_inputs (moneromooo-monero)
737b6d6 blockchain: make some flag twiddling code closer to the original (moneromooo-monero)
81cb0fc blockchain: fix bitflipping test with quantized block rewards (moneromooo-monero)
22ddf09 blockchain: add missing m_tx_pool.on_blockchain_dec (moneromooo-monero)
d837c0c blockchain: fix switch to alternative blockchain for more than one block (moneromooo-monero)
5cec076 blockchain: add a missing validity check to rollback_blockchain_switching (moneromooo-monero)
3cabdb5 core: catch exceptions from get_output_key (moneromooo-monero)
5eef645 db: throw when given a non txout_to_key output to add (moneromooo-monero)
Diffstat (limited to 'tests/core_tests/block_reward.cpp')
-rw-r--r-- | tests/core_tests/block_reward.cpp | 6 |
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]; } |