2022-09-30 10:40:22 +02:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2020-05-20 20:32:04 +02:00
|
|
|
from dataclasses import dataclass
|
|
|
|
from typing import List
|
|
|
|
|
2021-04-04 05:55:26 +02:00
|
|
|
from chia.types.peer_info import TimestampedPeerInfo
|
|
|
|
from chia.util.streamable import Streamable, streamable
|
2020-05-20 20:32:04 +02:00
|
|
|
|
|
|
|
"""
|
|
|
|
Protocol to introducer
|
2021-02-09 08:14:37 +01:00
|
|
|
Note: When changing this file, also change protocol_message_types.py, and the protocol version in shared_protocol.py
|
2020-05-20 20:32:04 +02:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
2021-02-09 08:14:37 +01:00
|
|
|
@streamable
|
2022-04-09 03:29:32 +02:00
|
|
|
@dataclass(frozen=True)
|
2021-02-09 08:14:37 +01:00
|
|
|
class RequestPeersIntroducer(Streamable):
|
2020-05-20 20:32:04 +02:00
|
|
|
"""
|
|
|
|
Return full list of peers
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
2021-02-09 08:14:37 +01:00
|
|
|
@streamable
|
2022-04-09 03:29:32 +02:00
|
|
|
@dataclass(frozen=True)
|
2021-02-09 08:14:37 +01:00
|
|
|
class RespondPeersIntroducer(Streamable):
|
2020-09-11 01:21:30 +02:00
|
|
|
peer_list: List[TimestampedPeerInfo]
|