diff --git a/dbhandler.py b/dbhandler.py index 8647e8f..79d7f5e 100644 --- a/dbhandler.py +++ b/dbhandler.py @@ -250,7 +250,10 @@ def dev_reward(self,node,block_array,miner_tx,mining_reward,mirror_hash): def hn_reward(self,node,block_array,miner_tx,mirror_hash): fork = Fork() - if node.last_block >= fork.POW_FORK or (node.is_testnet and node.last_block >= fork.POW_FORK_TESTNET): + if node.is_testnet and node.last_block >= fork.POW_FORK_TESTNET: + self.reward_sum = 24 - 10 * (node.last_block + 5 - fork.POW_FORK_TESTNET) / 3000000 + + elif node.last_block >= fork.POW_FORK: self.reward_sum = 24 - 10*(node.last_block + 5 - fork.POW_FORK)/3000000 else: self.reward_sum = 24 diff --git a/digest.py b/digest.py index 307e3e9..492b306 100644 --- a/digest.py +++ b/digest.py @@ -213,7 +213,9 @@ def process_transactions(block): if tx_index == block_instance.tx_count - 1: db_amount = 0 # prevent spending from another address, because mining txs allow delegation - if node.last_block >= fork.POW_FORK or (node.is_testnet and node.last_block >= fork.POW_FORK_TESTNET): + if node.is_testnet and node.last_block >= fork.POW_FORK_TESTNET: + block_instance.mining_reward = 15 - (block_instance.block_height_new - fork.POW_FORK_TESTNET) / 1100000 - 9.5 + elif node.last_block >= fork.POW_FORK: block_instance.mining_reward = 15 - (block_instance.block_height_new - fork.POW_FORK) / 1100000 - 9.5 else: block_instance.mining_reward = 15 - (quantize_eight(block_instance.block_height_new) / quantize_eight(1000000 / 2)) - Decimal("2.4")