Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions hathor/builder/cli_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,17 @@ def create_manager(self, reactor: Reactor) -> HathorManager:

hostname = self.get_hostname()
network = settings.NETWORK_NAME
enable_sync_v1 = not self._args.x_sync_v2_only
enable_sync_v2 = self._args.x_sync_v2_only or self._args.x_sync_bridge

arg_sync_v2_only = self._args.x_sync_v2_only or self._args.sync_v2_only
if self._args.x_sync_v2_only:
self.log.warn('--x-sync-v2-only is deprecated and will be removed, use --sync-v2-only instead')

arg_sync_bridge = self._args.x_sync_bridge or self._args.sync_bridge
if self._args.x_sync_bridge:
self.log.warn('--x-sync-bridge is deprecated and will be removed, use --sync-bridge instead')

enable_sync_v1 = not arg_sync_v2_only
enable_sync_v2 = arg_sync_v2_only or arg_sync_bridge

pubsub = PubSubManager(reactor)

Expand Down
5 changes: 5 additions & 0 deletions hathor/cli/run_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ def create_parser(cls) -> ArgumentParser:
help='Enable support for running both sync protocols. DO NOT ENABLE, IT WILL BREAK.')
v2args.add_argument('--x-sync-v2-only', action='store_true',
help='Disable support for running sync-v1. DO NOT ENABLE, IT WILL BREAK.')
# XXX: new safe arguments along side the unsafe --x- arguments so transition is easier
v2args.add_argument('--sync-bridge', action='store_true',
help='Enable support for running both sync protocols.')
v2args.add_argument('--sync-v2-only', action='store_true',
help='Disable support for running sync-v1.')
parser.add_argument('--x-localhost-only', action='store_true', help='Only connect to peers on localhost')
parser.add_argument('--x-rocksdb-indexes', action='store_true', help=SUPPRESS)
parser.add_argument('--x-enable-event-queue', action='store_true', help='Enable event queue mechanism')
Expand Down
2 changes: 2 additions & 0 deletions hathor/cli/run_node_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class RunNodeArgs(BaseModel, extra=Extra.allow):
enable_crash_api: bool
x_sync_bridge: bool
x_sync_v2_only: bool
sync_bridge: bool
sync_v2_only: bool
x_localhost_only: bool
x_rocksdb_indexes: bool
x_enable_event_queue: bool
Expand Down