@peer_required
@api_request
async def register_interest_in_coin(self, request: wallet_protocol.RegisterForCoinUpdates, peer: ws.WSChiaConnection):
    if (peer.peer_node_id not in self.full_node.peer_coin_ids):
        self.full_node.peer_coin_ids[peer.peer_node_id] = set()
    if (peer.peer_node_id not in self.full_node.peer_sub_counter):
        self.full_node.peer_sub_counter[peer.peer_node_id] = 0
    max_items = self.full_node.config.get('max_subscribe_items', 200000)
    for coin_id in request.coin_ids:
        if (coin_id not in self.full_node.coin_subscriptions):
            self.full_node.coin_subscriptions[coin_id] = set()
        if ((peer.peer_node_id not in self.full_node.coin_subscriptions[coin_id]) and (self.full_node.peer_sub_counter[peer.peer_node_id] < max_items)):
            self.full_node.coin_subscriptions[coin_id].add(peer.peer_node_id)
            self.full_node.peer_coin_ids[peer.peer_node_id].add(coin_id)
            self.full_node.peer_sub_counter[peer.peer_node_id] += 1
    states: List[CoinState] = (await self.full_node.coin_store.get_coin_states_by_ids(include_spent_coins=True, coin_ids=request.coin_ids, min_height=request.min_height))
    response = wallet_protocol.RespondToCoinUpdates(request.coin_ids, request.min_height, states)
    msg = make_msg(ProtocolMessageTypes.respond_to_coin_update, response)
    return msg
@peer_required
@api_request
async def register_interest_in_coin(self, request: wallet_protocol.RegisterForCoinUpdates, peer: ws.WSChiaConnection):
    if (peer.peer_node_id not in self.full_node.peer_coin_ids):
        self.full_node.peer_coin_ids[peer.peer_node_id] = set()
    if (peer.peer_node_id not in self.full_node.peer_sub_counter):
        self.full_node.peer_sub_counter[peer.peer_node_id] = 0
    max_items = self.full_node.config.get('max_subscribe_items', 200000)
    for coin_id in request.coin_ids:
        if (coin_id not in self.full_node.coin_subscriptions):
            self.full_node.coin_subscriptions[coin_id] = set()
        if ((peer.peer_node_id not in self.full_node.coin_subscriptions[coin_id]) and (self.full_node.peer_sub_counter[peer.peer_node_id] < max_items)):
            self.full_node.coin_subscriptions[coin_id].add(peer.peer_node_id)
            self.full_node.peer_coin_ids[peer.peer_node_id].add(coin_id)
            self.full_node.peer_sub_counter[peer.peer_node_id] += 1
    states: List[CoinState] = (await self.full_node.coin_store.get_coin_states_by_ids(include_spent_coins=True, coin_ids=request.coin_ids, min_height=request.min_height))
    response = wallet_protocol.RespondToCoinUpdates(request.coin_ids, request.min_height, states)
    msg = make_msg(ProtocolMessageTypes.respond_to_coin_update, response)
    return msg