Repository: Chia-Network/chia-blockchain
File: chia/consensus/coin_store_protocol.py (Python)

Code before:
    async def get_coin_record(self, coin_id: bytes32) -> Optional[CoinRecord]:
        """
        Returns the coin record for the specified coin id
        """

    async def get_coin_records(self, coin_ids: Collection[bytes32]) -> list[CoinRecord]:
        """
        Returns the coin records for the specified coin ids
        """

    async def get_coins_added_at_height(self, height: uint32) -> list[CoinRecord]:
        """
        Returns the coins added at a specific height
        """

    async def get_coins_removed_at_height(self, height: uint32) -> list[CoinRecord]:
        """
        Returns the coins removed at a specific height
        """

    async def get_coin_records_by_puzzle_hash(
        self,
        include_spent_coins: bool,
        puzzle_hash: bytes32,
        start_height: uint32 = uint32(0),
        end_height: uint32 = uint32((2**32) - 1),
    ) -> list[CoinRecord]:
        """
        Returns the coin records for a specific puzzle hash
        """

    async def get_coin_records_by_puzzle_hashes(
        self,
        coins: bool,
        puzzle_hashes: list[bytes32],
        start_height: uint32 = uint32(0),
        end_height: uint32 = uint32((2**32) - 1),
    ) -> list[CoinRecord]:
        """
        Returns the coin records for a list of puzzle hashes
        """

    async def get_coin_records_by_names(
        self,
        include_spent_coins: bool,
        names: list[bytes32],
        start_height: uint32 = uint32(0),
        end_height: uint32 = uint32((2**32) - 1),
    ) -> list[CoinRecord]:
        """
        Returns the coin records for a list of coin names

Review comment (suggestion):
Nothing is done with these values so it is a bit misleading to specify them here.  I believe the `Ellipses` object is the common filler to say that a default must be provided by implementations.

```suggestion
        start_height: uint32 = ...,
        end_height: uint32 = ...,
```

Code after:
    async def get_coin_record(self, coin_id: bytes32) -> Optional[CoinRecord]:
        """
        Returns the coin record for the specified coin id
        """

    async def get_coin_records(self, coin_ids: Collection[bytes32]) -> list[CoinRecord]:
        """
        Returns the coin records for the specified coin ids
        """

    async def get_coins_added_at_height(self, height: uint32) -> list[CoinRecord]:
        """
        Returns the coins added at a specific height
        """

    async def get_coins_removed_at_height(self, height: uint32) -> list[CoinRecord]:
        """
        Returns the coins removed at a specific height
        """

    async def get_coin_records_by_puzzle_hash(
        self,
        include_spent_coins: bool,
        puzzle_hash: bytes32,
        start_height: uint32 = ...,
        end_height: uint32 = ...,
    ) -> list[CoinRecord]:
        """
        Returns the coin records for a specific puzzle hash
        """

    async def get_coin_records_by_puzzle_hashes(
        self,
        coins: bool,
        puzzle_hashes: list[bytes32],
        start_height: uint32 = ...,
        end_height: uint32 = ...,
    ) -> list[CoinRecord]:
        """
        Returns the coin records for a list of puzzle hashes
        """

    async def get_coin_records_by_names(
        self,
        include_spent_coins: bool,
        names: list[bytes32],
        start_height: uint32 = ...,
        end_height: uint32 = ...,
    ) -> list[CoinRecord]:
        """
        Returns the coin records for a list of coin names