Remove testnet hack

This commit is contained in:
Jason Rhinelander 2022-05-27 21:40:36 -03:00
parent 3fa9572f42
commit 4cd7e629a9
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
3 changed files with 2 additions and 11 deletions

View File

@ -1342,7 +1342,6 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
oxen_block_reward_context block_reward_context = {};
block_reward_context.fee = fee;
block_reward_context.height = height;
block_reward_context.testnet_override = nettype() == network_type::TESTNET && height < 386000;
if (!calc_batched_governance_reward(height, block_reward_context.batched_governance))
{
MERROR_VER("Failed to calculate batched governance reward");

View File

@ -559,15 +559,8 @@ namespace cryptonote
{
result.service_node_total = service_node_reward;
if (oxen_context.testnet_override)
{
result.miner_fee = oxen_context.fee;
}
else
{
uint64_t const penalty = base_reward_unpenalized - base_reward;
result.miner_fee = penalty >= oxen_context.fee ? 0 : oxen_context.fee - penalty;
}
uint64_t const penalty = base_reward_unpenalized - base_reward;
result.miner_fee = penalty >= oxen_context.fee ? 0 : oxen_context.fee - penalty;
// In HF16, the block producer changes between the Miner and Service Node
// depending on the state of the Service Node network. The producer is no

View File

@ -152,7 +152,6 @@ namespace cryptonote
struct oxen_block_reward_context
{
using portions = uint64_t;
bool testnet_override;
uint64_t height;
uint64_t fee;
uint64_t batched_governance; // Optional: 0 hardfork v10, then must be calculated using blockchain::calc_batched_governance_reward