generated from maximegris/angular-electron
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor settings, privnet and process fixes
- Loading branch information
1 parent
bc0aac3
commit 57db3ea
Showing
12 changed files
with
167 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
"email": "[email protected]" | ||
}, | ||
"version": "1.1.0", | ||
|
||
"main": "main.js", | ||
"private": true, | ||
"dependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,11 @@ | ||
import { DaemonSettings } from "./DaemonSettings"; | ||
import { PrivnetDaemonSettings } from "./PrivnetDaemonSettings"; | ||
|
||
export class DefaultPrivnetNode1Settings extends DaemonSettings { | ||
|
||
public override get isPrivnet(): boolean { | ||
return true; | ||
} | ||
export class DefaultPrivnetNode1Settings extends PrivnetDaemonSettings { | ||
|
||
constructor(monerodPath: string = '') { | ||
super(); | ||
this.monerodPath = monerodPath; | ||
this.testnet = true; | ||
this.noIgd = true; | ||
this.hideMyPort = true; | ||
this.dataDir = '.localnet/xmr_local/node1'; | ||
this.p2pBindIp = '127.0.0.1'; | ||
this.logLevel = 0; | ||
super(monerodPath, '.localnet/xmr_local/node1'); | ||
|
||
this.addExclusiveNode('127.0.0.1:48080'); | ||
this.addExclusiveNode('127.0.0.1:58080'); | ||
this.rpcAccessControlOrigins = '*'; | ||
this.fixedDifficulty = 500; | ||
this.disableRpcBan = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,16 @@ | ||
import { DaemonSettings } from "./DaemonSettings"; | ||
import { PrivnetDaemonSettings } from "./PrivnetDaemonSettings"; | ||
|
||
export class DefaultPrivnetNode2Settings extends DaemonSettings { | ||
|
||
public override get isPrivnet(): boolean { | ||
return true; | ||
} | ||
export class DefaultPrivnetNode2Settings extends PrivnetDaemonSettings { | ||
|
||
constructor(monerodPath: string = '') { | ||
super(); | ||
super(monerodPath, '.localnet/xmr_local/node2'); | ||
|
||
this.monerodPath = monerodPath; | ||
this.testnet = true; | ||
this.noIgd = true; | ||
this.hideMyPort = true; | ||
this.dataDir = '.localnet/xmr_local/node2'; | ||
this.p2pBindIp = '127.0.0.1'; | ||
this.p2pBindPort = 48080; | ||
this.rpcBindPort = 48081; | ||
this.zmqRpcBindPort = 48082; | ||
this.logLevel = 1; | ||
this.confirmExternalBind = true; | ||
this.addExclusiveNode('127.0.0.1:28080'); | ||
this.addExclusiveNode('127.0.0.1:58080'); | ||
this.rpcAccessControlOrigins = '*'; | ||
this.fixedDifficulty = 500; | ||
this.disableRpcBan = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { DaemonSettings } from "./DaemonSettings"; | ||
|
||
export class PrivnetDaemonSettings extends DaemonSettings { | ||
|
||
protected _dataDir: string; | ||
|
||
public override get isPrivnet(): boolean { | ||
return true; | ||
} | ||
|
||
constructor(monerodPath: string, dataDir: string) { | ||
super(); | ||
this.testnet = true; | ||
this.noIgd = true; | ||
this.hideMyPort = true; | ||
this.p2pBindIp = '127.0.0.1'; | ||
this.logLevel = 0; | ||
this.rpcAccessControlOrigins = '*'; | ||
this.fixedDifficulty = 500; | ||
this.disableRpcBan = true; | ||
this.syncOnWifi = true; | ||
this._dataDir = dataDir; | ||
this.setMonerodPath(monerodPath); | ||
} | ||
|
||
private refreshDataDir(): void { | ||
if (this.monerodPath == '') { | ||
this.dataDir = ''; | ||
return; | ||
} | ||
|
||
const separator: '\\' | '/' = this.monerodPath.includes('\\') ? '\\' : '/'; | ||
const dataDirSeparator: '\\' | '/' = this._dataDir.includes('\\') ? '\\' : '/'; | ||
const needsReplace = dataDirSeparator !== separator; | ||
|
||
const dataDir = needsReplace ? this._dataDir.replaceAll(dataDirSeparator, separator) : this._dataDir; | ||
|
||
const components = this.monerodPath.split(separator); | ||
components.pop(); | ||
const path = components.join(separator); | ||
|
||
this.dataDir = `${path}${separator}${dataDir}`; | ||
} | ||
|
||
public setMonerodPath(monerodPath: string): void { | ||
this.monerodPath = monerodPath; | ||
|
||
this.refreshDataDir(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
"es2016", | ||
"es2015", | ||
"es2018", | ||
"es2021", | ||
"dom" | ||
], | ||
"useDefineForClassFields": false | ||
|