added solution of tutorial 7

This commit is contained in:
Ryan Bakkes 2023-11-10 12:46:25 +01:00
parent b5520ec9cc
commit b45d28c64c

View File

@ -37,6 +37,10 @@ class TxBlock (CBlock):
if not tx.is_valid(): if not tx.is_valid():
return False return False
if self.nonce != "A random nonce":
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) Tx_Balance = round(total_out - total_in, 10)