@@ -108,8 +108,8 @@ static const struct {
108108 // version 6 starts from block 1400000, which is on or around the 16th of September, 2017. Fork time finalised on 2017-08-18.
109109 { 6 , 1400000 , 0 , 1503046577 },
110110
111- // version 0xa7 starts from block 1881040 , timestamp after block 1876000 + 1week
112- // { 0xa7, 1881040 , 0, 1561887557 + 7 * 24 * 60 * 60 },
111+ // version 0xa7 starts from block 1906800
112+ { 0xa7 , 1996800 , 0 , 1565587533 },
113113};
114114static const uint64_t mainnet_hard_fork_version_1_till = 1009826 ;
115115
@@ -1284,8 +1284,7 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
12841284
12851285 std::vector<uint64_t > last_blocks_weights;
12861286 get_last_n_blocks_weights (last_blocks_weights, CRYPTONOTE_REWARD_BLOCKS_WINDOW);
1287- bool fork = height >= TEST_NEW_BLOCK_REWARD_HEIGHT;
1288- if (!get_block_reward (epee::misc_utils::median (last_blocks_weights), cumulative_block_weight, already_generated_coins, base_reward, version, fork))
1287+ if (!get_block_reward (epee::misc_utils::median (last_blocks_weights), cumulative_block_weight, already_generated_coins, base_reward, version))
12891288 {
12901289 MERROR_VER (" block weight " << cumulative_block_weight << " is bigger than allowed for this blockchain" );
12911290 return false ;
@@ -1319,6 +1318,7 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
13191318 if (m_fundctl.funding_enabled (height))
13201319 {
13211320// bool ret = fundctl.check_block_funding(miner_reward_amount, funding_amount, base_reward + fee);
1321+ bool fork = height >= DIFFICULTY_ADJUST_HEIGHT;
13221322 bool ret = m_fundctl.check_block_funding (miner_reward_amount, funding_amount, base_reward + fee, fork);
13231323 MINFO (" miner_reward_amount=" << miner_reward_amount << " , funding_amount=" << funding_amount << " , money_in_use=" << (base_reward + fee));
13241324 CHECK_AND_ASSERT_MES (ret, false , " check reward failed" );
@@ -1519,8 +1519,7 @@ bool Blockchain::create_block_template(block& b, const crypto::hash *from_block,
15191519
15201520 size_t txs_weight;
15211521 uint64_t fee;
1522- bool fork = height >= TEST_NEW_BLOCK_REWARD_HEIGHT;
1523- if (!m_tx_pool.fill_block_template (b, median_weight, already_generated_coins, txs_weight, fee, expected_reward, b.major_version , fork))
1522+ if (!m_tx_pool.fill_block_template (b, median_weight, already_generated_coins, txs_weight, fee, expected_reward, b.major_version ))
15241523 {
15251524 return false ;
15261525 }
@@ -3331,8 +3330,7 @@ bool Blockchain::check_fee(size_t tx_weight, uint64_t fee) const
33313330 median = m_current_block_cumul_weight_limit / 2 ;
33323331 const uint64_t blockchain_height = m_db->height ();
33333332 already_generated_coins = blockchain_height ? m_db->get_block_already_generated_coins (blockchain_height - 1 ) : 0 ;
3334- bool fork = blockchain_height >= TEST_NEW_BLOCK_REWARD_HEIGHT;
3335- if (!get_block_reward (median, 1 , already_generated_coins, base_reward, version, fork))
3333+ if (!get_block_reward (median, 1 , already_generated_coins, base_reward, version))
33363334 return false ;
33373335 }
33383336
@@ -3398,8 +3396,7 @@ uint64_t Blockchain::get_dynamic_base_fee_estimate(uint64_t grace_blocks) const
33983396
33993397 uint64_t already_generated_coins = db_height ? m_db->get_block_already_generated_coins (db_height - 1 ) : 0 ;
34003398 uint64_t base_reward;
3401- bool fork = db_height >= TEST_NEW_BLOCK_REWARD_HEIGHT;
3402- if (!get_block_reward (median, 1 , already_generated_coins, base_reward, version, fork))
3399+ if (!get_block_reward (median, 1 , already_generated_coins, base_reward, version))
34033400 {
34043401 MERROR (" Failed to determine block reward, using placeholder " << print_money (BLOCK_REWARD_OVERESTIMATE) << " as a high bound" );
34053402 base_reward = BLOCK_REWARD_OVERESTIMATE;
0 commit comments