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
5 changes: 3 additions & 2 deletions hathor/builder/cli_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ def create_manager(self, reactor: Reactor) -> HathorManager:

sync_choice: SyncChoice
if self._args.sync_bridge:
self.log.warn('--sync-bridge is the default, this parameter has no effect')
sync_choice = SyncChoice.BRIDGE
elif self._args.sync_v1_only:
sync_choice = SyncChoice.V1_ONLY
elif self._args.sync_v2_only:
self.log.warn('--sync-v2-only is the default, this parameter has no effect')
sync_choice = SyncChoice.V2_ONLY
elif self._args.x_sync_bridge:
self.log.warn('--x-sync-bridge is deprecated and will be removed, use --sync-bridge instead')
Expand All @@ -190,7 +190,8 @@ def create_manager(self, reactor: Reactor) -> HathorManager:
self.log.warn('--x-sync-v2-only is deprecated and will be removed, use --sync-v2-only instead')
sync_choice = SyncChoice.V2_ONLY
else:
sync_choice = SyncChoice.BRIDGE
# XXX: this is the default behavior when no parameter is given
sync_choice = SyncChoice.V2_ONLY

enable_sync_v1: bool
enable_sync_v2: bool
Expand Down
4 changes: 2 additions & 2 deletions tests/others/test_cli_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_all_default(self):
self.assertIsInstance(manager.tx_storage.indexes, RocksDBIndexesManager)
self.assertIsNone(manager.wallet)
self.assertEqual('unittests', manager.network)
self.assertTrue(manager.connections.is_sync_version_enabled(SyncVersion.V1_1))
self.assertFalse(manager.connections.is_sync_version_enabled(SyncVersion.V1_1))
self.assertTrue(manager.connections.is_sync_version_enabled(SyncVersion.V2))
self.assertFalse(self.resources_builder._built_prometheus)
self.assertFalse(self.resources_builder._built_status)
Expand Down Expand Up @@ -103,7 +103,7 @@ def test_memory_storage_with_rocksdb_indexes(self):

def test_sync_default(self):
manager = self._build(['--memory-storage'])
self.assertTrue(manager.connections.is_sync_version_enabled(SyncVersion.V1_1))
self.assertFalse(manager.connections.is_sync_version_enabled(SyncVersion.V1_1))
self.assertTrue(manager.connections.is_sync_version_enabled(SyncVersion.V2))

def test_sync_bridge(self):
Expand Down