From 3d239a7526a9d85090855d838778fd7fe8ba3cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20F=C3=BCrderer?= Date: Mon, 25 Mar 2024 21:53:42 +0100 Subject: [PATCH] Fix a bug that caused the node to crash --- blockchain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/blockchain.py b/blockchain.py index d3e7580..43f1ce1 100644 --- a/blockchain.py +++ b/blockchain.py @@ -139,6 +139,7 @@ class Block: return balances = prev_block.balances.copy() balances.setdefault(self.miner_pubkey, 0) + balances.setdefault(t.receiver, 0) balances[self.miner_pubkey] += 100 t = self.transaction if t is not None: