Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
glevco committed Oct 23, 2024
1 parent 2034c11 commit bb266e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hathor/builder/cli_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ def create_manager(self, reactor: Reactor) -> HathorManager:
log_vertex_bytes=self._args.log_vertex_bytes,
)

if self._args.x_multiprocess_p2p:
self.check_or_raise(
self._args.x_remove_sync_v1,
'multiprocess support for P2P is only available if sync-v1 is removed (use --x-remove-sync-v1)'
)
raise NotImplementedError('Multiprocess support for P2P is not yet implemented.')

p2p_dependencies = P2PDependencies(
reactor=reactor,
settings=settings,
Expand Down
2 changes: 2 additions & 0 deletions hathor/cli/run_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class RunNode:
('--x-enable-event-queue', lambda args: bool(args.x_enable_event_queue)),
('--x-asyncio-reactor', lambda args: bool(args.x_asyncio_reactor)),
('--x-ipython-kernel', lambda args: bool(args.x_ipython_kernel)),
('--x-multiprocess-p2p', lambda args: bool(args.x_multiprocess_p2p)),
]

env_vars_prefix: str | None = None
Expand Down Expand Up @@ -162,6 +163,7 @@ def create_parser(cls) -> ArgumentParser:
help='Log tx bytes for debugging')
parser.add_argument('--disable-ws-history-streaming', action='store_true',
help='Disable websocket history streaming API')
parser.add_argument('--x-multiprocess-p2p', action='store_true', help='Enable multiprocess support for P2P.')
return parser

def prepare(self, *, register_resources: bool = True) -> None:
Expand Down
1 change: 1 addition & 0 deletions hathor/cli/run_node_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ class RunNodeArgs(BaseModel, extra=Extra.allow):
nano_testnet: bool
log_vertex_bytes: bool
disable_ws_history_streaming: bool
x_multiprocess_p2p: bool

0 comments on commit bb266e3

Please sign in to comment.