mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
Sanity check correct header hash in replace proof. (#7045)
This commit is contained in:
parent
92f5c5c3a9
commit
aba34c1ceb
@ -1765,9 +1765,12 @@ class FullNode:
|
||||
full_blocks = await self.block_store.get_full_blocks_at([height])
|
||||
assert len(full_blocks) > 0
|
||||
replaced = False
|
||||
expected_header_hash = self.blockchain.height_to_hash(height)
|
||||
for block in full_blocks:
|
||||
new_block = None
|
||||
block_record = await self.blockchain.get_block_record_from_db(self.blockchain.height_to_hash(height))
|
||||
if block.header_hash != expected_header_hash:
|
||||
continue
|
||||
block_record = await self.blockchain.get_block_record_from_db(expected_header_hash)
|
||||
assert block_record is not None
|
||||
|
||||
if field_vdf == CompressibleVDFField.CC_EOS_VDF:
|
||||
|
Loading…
Reference in New Issue
Block a user