Explorar o código

fix block.verify_prev_block()

Malte Kraus %!s(int64=8) %!d(string=hai) anos
pai
achega
4be5c895d4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/block.py

+ 1 - 1
src/block.py

@@ -89,7 +89,7 @@ class Block:
 
     def verify_prev_block(self, chain):
         """ Verify the previous block pointer points to a valid block in the given block chain. """
-        return chain.get_block_by_hash(chain) is not None
+        return chain.get_block_by_hash(self.prev_block_hash) is not None
 
     def verify_transactions(self, chain):
         """ Verify all transaction in this block are valid in the given block chain. """