Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
feat: Start Tor at startup (if no stub testnet provider is present)
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron committed Jun 10, 2024
1 parent feb43ff commit 93da858
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
} from 'store/config';
import { resolveHtmlPath } from './util';
import { startRPC, stopCli } from './cli/cli';
import { getPlatform, isDevelopment, isTestnet } from 'store/config';
import getSavedLogsOfSwapId, { getAssetPath, fixAppDataPath } from './cli/dirs';
import initSocket from './socket';

Check failure on line 23 in src/main/main.ts

View workflow job for this annotation

GitHub Actions / release (ubuntu-latest)

Dependency cycle detected

Check failure on line 23 in src/main/main.ts

View workflow job for this annotation

GitHub Actions / release (ubuntu-latest)

Dependency cycle detected
import logger from '../utils/logger';
Expand Down Expand Up @@ -135,6 +134,12 @@ if (gotTheLock) {
initSocket();
await startRPC();

// Don't spawn Tor if we have a stub testnet provider
// It's most likely gonna be a local one and we cannot build Tor circuits to it
if (getStubTestnetProvider() != null) {
await spawnTor();
}

return 0;
})
.catch((e) =>
Expand Down

0 comments on commit 93da858

Please sign in to comment.