mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-05 02:24:21 -05:00
remove duplicate code
This commit is contained in:
@@ -531,10 +531,6 @@ class Blockchain(BlockchainInterface):
|
||||
def sub_block_record(self, header_hash: bytes32) -> SubBlockRecord:
|
||||
return self.__sub_blocks[header_hash]
|
||||
|
||||
def height_to_sub_block_record(self, sub_height: uint32) -> SubBlockRecord:
|
||||
header_hash = self.sub_height_to_hash(sub_height)
|
||||
return self.sub_block_record(header_hash)
|
||||
|
||||
def get_ses_heights(self) -> List[uint32]:
|
||||
return sorted(self.__sub_epoch_summaries.keys())
|
||||
|
||||
|
||||
@@ -28,10 +28,6 @@ class BlockCache(BlockchainInterface):
|
||||
def sub_block_record(self, header_hash: bytes32) -> SubBlockRecord:
|
||||
return self._sub_blocks[header_hash]
|
||||
|
||||
def height_to_sub_block_record(self, height: uint32, check_db=False) -> SubBlockRecord:
|
||||
header_hash = self.sub_height_to_hash(height)
|
||||
return self.sub_block_record(header_hash)
|
||||
|
||||
def get_ses_heights(self) -> List[uint32]:
|
||||
return sorted(self._sub_epoch_summaries.keys())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user