@peer_required
@api_request
async def new_end_of_sub_slot_vdf(self, request: timelord_protocol.NewEndOfSubSlotVDF, peer: ws.WSChiaConnection) -> Optional[Message]:
    if self.full_node.sync_store.get_sync_mode():
        return None
    if (self.full_node.full_node_store.get_sub_slot(request.end_of_sub_slot_bundle.challenge_chain.get_hash()) is not None):
        return None
    full_node_message = full_node_protocol.RespondEndOfSubSlot(request.end_of_sub_slot_bundle)
    (msg, added) = (await self.full_node.respond_end_of_sub_slot(full_node_message, peer))
    if (not added):
        self.log.error(f'Was not able to add end of sub-slot: {request.end_of_sub_slot_bundle.challenge_chain.challenge_chain_end_of_slot_vdf.challenge}. Re-sending new-peak to timelord')
        (await self.full_node.send_peak_to_timelords(peer=peer))
        return None
    else:
        return msg
@peer_required
@api_request
async def new_end_of_sub_slot_vdf(self, request: timelord_protocol.NewEndOfSubSlotVDF, peer: ws.WSChiaConnection) -> Optional[Message]:
    if self.full_node.sync_store.get_sync_mode():
        return None
    if (self.full_node.full_node_store.get_sub_slot(request.end_of_sub_slot_bundle.challenge_chain.get_hash()) is not None):
        return None
    full_node_message = full_node_protocol.RespondEndOfSubSlot(request.end_of_sub_slot_bundle)
    (msg, added) = (await self.full_node.respond_end_of_sub_slot(full_node_message, peer))
    if (not added):
        self.log.error(f'Was not able to add end of sub-slot: {request.end_of_sub_slot_bundle.challenge_chain.challenge_chain_end_of_slot_vdf.challenge}. Re-sending new-peak to timelord')
        (await self.full_node.send_peak_to_timelords(peer=peer))
        return None
    else:
        return msg