diff --git a/chia/server/outbound_message.py b/chia/server/outbound_message.py index 1892f76b2d35..94314d7aa19e 100644 --- a/chia/server/outbound_message.py +++ b/chia/server/outbound_message.py @@ -1,22 +1,14 @@ from __future__ import annotations from dataclasses import dataclass -from enum import IntEnum from typing import Optional, SupportsBytes, Union from chia.protocols.protocol_message_types import ProtocolMessageTypes +from chia.types.node_type import NodeType # TODO: remove this and change a lot of `import` statements from chia.util.ints import uint8, uint16 from chia.util.streamable import Streamable, streamable - -class NodeType(IntEnum): - FULL_NODE = 1 - HARVESTER = 2 - FARMER = 3 - TIMELORD = 4 - INTRODUCER = 5 - WALLET = 6 - DATA_LAYER = 7 +__all__ = ["Message", "NodeType", "make_msg"] @streamable diff --git a/chia/types/node_type.py b/chia/types/node_type.py new file mode 100644 index 000000000000..f7add83e54e6 --- /dev/null +++ b/chia/types/node_type.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from enum import IntEnum + + +class NodeType(IntEnum): + FULL_NODE = 1 + HARVESTER = 2 + FARMER = 3 + TIMELORD = 4 + INTRODUCER = 5 + WALLET = 6 + DATA_LAYER = 7 diff --git a/chia/util/config.py b/chia/util/config.py index 2859d4b6655e..631bbfd122ed 100644 --- a/chia/util/config.py +++ b/chia/util/config.py @@ -18,7 +18,7 @@ import yaml from typing_extensions import Literal -from chia.server.outbound_message import NodeType +from chia.types.node_type import NodeType from chia.types.peer_info import UnresolvedPeerInfo from chia.util.lock import Lockfile