mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
Remove unused BlockHeightMapProtocol (#21167)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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]: ...
|
||||
Reference in New Issue
Block a user