Nail in the coffin for vault issues... hopefully.

This commit is contained in:
7400
2023-12-28 18:49:33 -08:00
parent 52cb2f8ad0
commit 95624f0df0

View File

@@ -93,6 +93,9 @@ class BlockState:
def fork(self, block: Block): def fork(self, block: Block):
if block.hash == self.root_block.hash:
return Fork([block.hash], height=block.height)
if block.height - self.ancestors[block.hash].height > 1: if block.height - self.ancestors[block.hash].height > 1:
# noinspection PyTypeChecker # noinspection PyTypeChecker
return DisjointFork(block, self.root_block) return DisjointFork(block, self.root_block)