Remove unused BlockHeightMapProtocol (#21167)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Richard Kiss
2026-07-27 07:39:15 -07:00
committed by GitHub
co-authored by Cursor
parent 346fb9a0cf
commit 359497ac2b
2 changed files with 1 additions and 25 deletions
+1 -2
View File
@@ -9,7 +9,6 @@ from chia_rs import SubEpochSummary
from chia_rs.sized_bytes import bytes32
from chia_rs.sized_ints import uint32
from chia.consensus.block_height_map_protocol import BlockHeightMapProtocol
from chia.util.db_wrapper import DBWrapper2
from chia.util.files import write_file_async
from chia.util.streamable import Streamable, streamable
@@ -23,7 +22,7 @@ class SesCache(Streamable):
content: list[tuple[uint32, bytes]]
class BlockHeightMap(BlockHeightMapProtocol):
class BlockHeightMap:
db: DBWrapper2
# the below dictionaries are loaded from the database, from the peak
@@ -1,23 +0,0 @@
from __future__ import annotations
from typing import Protocol
from chia_rs import SubEpochSummary
from chia_rs.sized_bytes import bytes32
from chia_rs.sized_ints import uint32
class BlockHeightMapProtocol(Protocol):
def update_height(self, height: uint32, header_hash: bytes32, ses: SubEpochSummary | None) -> None: ...
def get_hash(self, height: uint32) -> bytes32: ...
def contains_height(self, height: uint32) -> bool: ...
def rollback(self, fork_height: int) -> None: ...
def ensure_capacity(self, height: int) -> None: ...
def get_ses(self, height: uint32) -> SubEpochSummary: ...
def get_ses_heights(self) -> list[uint32]: ...