소스 검색

fix block.verify_prev_block()

Malte Kraus 8 년 전
부모
커밋
4be5c895d4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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. """