Skip to content

Commit

Permalink
Move NodeType to its own file out of chia.server
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkiss committed Jan 28, 2025
1 parent 3410597 commit 3695062
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
12 changes: 2 additions & 10 deletions chia/server/outbound_message.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 13 additions & 0 deletions chia/types/node_type.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion chia/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3695062

Please sign in to comment.