From bc5926f235018e265ce5bc00b7973fd21d441e00 Mon Sep 17 00:00:00 2001 From: spekulaas Date: Sat, 11 Nov 2023 11:25:07 +0100 Subject: [PATCH] changed reward value,added meta,removed reward chk --- goodchain/src/classes/TxBlock.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/goodchain/src/classes/TxBlock.py b/goodchain/src/classes/TxBlock.py index f707621..108e420 100644 --- a/goodchain/src/classes/TxBlock.py +++ b/goodchain/src/classes/TxBlock.py @@ -5,7 +5,7 @@ from cryptography.hazmat.backends import default_backend import random -REWARD_VALUE = 25.0 +REWARD_VALUE = 50.0 leading_zeros = 2 next_char_limit = 20 @@ -13,6 +13,7 @@ class TxBlock (CBlock): def __init__(self, previousBlock): self.nonce = "A random nonce" + self.metadata = {} self.time = None self.date = None super(TxBlock, self).__init__([], previousBlock) @@ -41,12 +42,12 @@ class TxBlock (CBlock): if not self.good_nonce(): return False - total_in, total_out = self.__count_totals() + # total_in, total_out = self.__count_totals() - Tx_Balance = round(total_out - total_in, 10) - - if Tx_Balance > REWARD_VALUE: - return False + # Tx_Balance = round(total_out - total_in, 10) + # print("Tx_Balance: ", Tx_Balance) + # if Tx_Balance > REWARD_VALUE: + # return False return True def good_nonce(self):