From b5520ec9ccf88d7ae89744172060846883fe30e2 Mon Sep 17 00:00:00 2001 From: spekulaas Date: Fri, 10 Nov 2023 11:46:14 +0100 Subject: [PATCH] fixed tutorial needed for final assignment --- period_1/07-mining/703_TX2_A02_Nonce - tamper test/TxBlock.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/period_1/07-mining/703_TX2_A02_Nonce - tamper test/TxBlock.py b/period_1/07-mining/703_TX2_A02_Nonce - tamper test/TxBlock.py index 58cec14..4bb47ed 100644 --- a/period_1/07-mining/703_TX2_A02_Nonce - tamper test/TxBlock.py +++ b/period_1/07-mining/703_TX2_A02_Nonce - tamper test/TxBlock.py @@ -35,6 +35,10 @@ class TxBlock (CBlock): if not tx.is_valid(): return False + if self.nonce != "A random nonce": + if not self.good_nonce(): + return False + total_in, total_out = self.__count_totals() Tx_Balance = round(total_out - total_in, 10)