mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-11 01:28:17 +03:00
Merge commit '6fdc5de38e16be470ba83a327f764c7b649be8f2' into checkpoint/long_lived_atari_from_main_6fdc5de38e16be470ba83a327f764c7b649be8f2
This commit is contained in:
commit
806d596a95
@ -296,8 +296,8 @@ class Blockchain(BlockchainInterface):
|
||||
)
|
||||
raise
|
||||
|
||||
# This is done outside the try-except in case it fails, since we do not want to revert anything if it does
|
||||
await self.__height_map.maybe_flush()
|
||||
# This is done outside the try-except in case it fails, since we do not want to revert anything if it does
|
||||
await self.__height_map.maybe_flush()
|
||||
|
||||
if state_change_summary is not None:
|
||||
# new coin records added
|
||||
|
@ -130,9 +130,8 @@ class BlockHeightMap:
|
||||
def update_height(self, height: uint32, header_hash: bytes32, ses: Optional[SubEpochSummary]):
|
||||
# we're only updating the last hash. If we've reorged, we already rolled
|
||||
# back, making this the new peak
|
||||
idx = height * 32
|
||||
assert idx <= len(self.__height_to_hash)
|
||||
self.__height_to_hash[idx : idx + 32] = header_hash
|
||||
assert height * 32 <= len(self.__height_to_hash)
|
||||
self.__set_hash(height, header_hash)
|
||||
if ses is not None:
|
||||
self.__sub_epoch_summaries[height] = bytes(ses)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user