diff --git a/hub/hub/__init__.py b/hub/herald/__init__.py similarity index 100% rename from hub/hub/__init__.py rename to hub/herald/__init__.py diff --git a/hub/hub/__main__.py b/hub/herald/__main__.py similarity index 88% rename from hub/hub/__main__.py rename to hub/herald/__main__.py index f144431..835820b 100644 --- a/hub/hub/__main__.py +++ b/hub/herald/__main__.py @@ -3,8 +3,8 @@ import logging import traceback import argparse from hub.common import setup_logging -from hub.hub.env import ServerEnv -from hub.hub.service import HubServerService +from hub.herald.env import ServerEnv +from hub.herald.service import HubServerService def main(): diff --git a/hub/hub/common.py b/hub/herald/common.py similarity index 100% rename from hub/hub/common.py rename to hub/herald/common.py diff --git a/hub/hub/env.py b/hub/herald/env.py similarity index 100% rename from hub/hub/env.py rename to hub/herald/env.py diff --git a/hub/hub/framer.py b/hub/herald/framer.py similarity index 100% rename from hub/hub/framer.py rename to hub/herald/framer.py diff --git a/hub/hub/jsonrpc.py b/hub/herald/jsonrpc.py similarity index 99% rename from hub/hub/jsonrpc.py rename to hub/herald/jsonrpc.py index d464e35..c940f40 100644 --- a/hub/hub/jsonrpc.py +++ b/hub/herald/jsonrpc.py @@ -7,7 +7,7 @@ from asyncio import Event from functools import partial from numbers import Number from hub.common import RPCError, CodeMessageError -from hub.hub.common import Notification, Request, Response, Batch, ProtocolError +from hub.herald.common import Notification, Request, Response, Batch, ProtocolError class JSONRPC: diff --git a/hub/hub/mempool.py b/hub/herald/mempool.py similarity index 99% rename from hub/hub/mempool.py rename to hub/herald/mempool.py index 1e57a57..0ec1e0d 100644 --- a/hub/hub/mempool.py +++ b/hub/herald/mempool.py @@ -12,7 +12,7 @@ from hub.db.common import UTXO from hub.scribe.transaction.deserializer import Deserializer if typing.TYPE_CHECKING: - from hub.hub.session import SessionManager + from hub.herald.session import SessionManager from hub.db import HubDB diff --git a/hub/hub/service.py b/hub/herald/service.py similarity index 96% rename from hub/hub/service.py rename to hub/herald/service.py index 6981ca5..c2fa69c 100644 --- a/hub/hub/service.py +++ b/hub/herald/service.py @@ -2,13 +2,13 @@ import time import typing import asyncio from hub.scribe.daemon import LBCDaemon -from hub.hub.session import SessionManager -from hub.hub.mempool import HubMemPool -from hub.hub.udp import StatusServer +from hub.herald.session import SessionManager +from hub.herald.mempool import HubMemPool +from hub.herald.udp import StatusServer from hub.service import BlockchainReaderService from hub.elasticsearch import ElasticNotifierClientProtocol if typing.TYPE_CHECKING: - from hub.hub.env import ServerEnv + from hub.herald.env import ServerEnv class HubServerService(BlockchainReaderService): diff --git a/hub/hub/session.py b/hub/herald/session.py similarity index 99% rename from hub/hub/session.py rename to hub/herald/session.py index f9c6341..06c4bab 100644 --- a/hub/hub/session.py +++ b/hub/herald/session.py @@ -18,19 +18,19 @@ from prometheus_client import Counter, Info, Histogram, Gauge from hub.schema.result import Outputs from hub.error import ResolveCensoredError, TooManyClaimSearchParametersError from hub import __version__, PROMETHEUS_NAMESPACE -from hub.hub import PROTOCOL_MIN, PROTOCOL_MAX, HUB_PROTOCOL_VERSION +from hub.herald import PROTOCOL_MIN, PROTOCOL_MAX, HUB_PROTOCOL_VERSION from hub.build_info import BUILD, COMMIT_HASH, DOCKER_TAG from hub.elasticsearch import SearchIndex from hub.common import sha256, hash_to_hex_str, hex_str_to_hash, HASHX_LEN, version_string, formatted_time from hub.common import protocol_version, RPCError, DaemonError, TaskGroup, HISTOGRAM_BUCKETS -from hub.hub.jsonrpc import JSONRPCAutoDetect, JSONRPCConnection, JSONRPCv2, JSONRPC -from hub.hub.common import BatchRequest, ProtocolError, Request, Batch, Notification -from hub.hub.framer import NewlineFramer +from hub.herald.jsonrpc import JSONRPCAutoDetect, JSONRPCConnection, JSONRPCv2, JSONRPC +from hub.herald.common import BatchRequest, ProtocolError, Request, Batch, Notification +from hub.herald.framer import NewlineFramer if typing.TYPE_CHECKING: from hub.db import HubDB - from hub.hub.env import ServerEnv + from hub.herald.env import ServerEnv from hub.scribe.daemon import LBCDaemon - from hub.hub.mempool import HubMemPool + from hub.herald.mempool import HubMemPool BAD_REQUEST = 1 DAEMON_ERROR = 2 diff --git a/hub/hub/udp.py b/hub/herald/udp.py similarity index 100% rename from hub/hub/udp.py rename to hub/herald/udp.py