diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2019-02-21 14:15:39 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2019-02-21 14:15:39 -0600 |
| commit | f2b4c468a2379696d65c9a86b6d034cf77ab9b4a (patch) | |
| tree | 70b3a6c91bdf7ed1f3072c5906b859483528ead1 /main.qml | |
| parent | 7a5456e3e4696434950305961f20b6cd150647a8 (diff) | |
| parent | 3aff7ddcef593df2ac3448164b8a9abf33f8aaf5 (diff) | |
| download | monzero-gui-f2b4c468a2379696d65c9a86b6d034cf77ab9b4a.tar.gz monzero-gui-f2b4c468a2379696d65c9a86b6d034cf77ab9b4a.tar.xz monzero-gui-f2b4c468a2379696d65c9a86b6d034cf77ab9b4a.zip | |
Merge pull request #1943
3aff7dd Fix default daemon/remote node RPC port based on the network type (xiphon)
Diffstat (limited to 'main.qml')
| -rw-r--r-- | main.qml | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -78,7 +78,7 @@ ApplicationWindow { property bool androidCloseTapped: false; property int userLastActive; // epoch // Default daemon addresses - readonly property string localDaemonAddress : persistentSettings.nettype == NetworkType.MAINNET ? "localhost:18081" : persistentSettings.nettype == NetworkType.TESTNET ? "localhost:28081" : "localhost:38081" + readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype) property string currentDaemonAddress; property bool startLocalNodeCancelled: false property int estimatedBlockchainSize: 50 // GB @@ -1030,7 +1030,7 @@ ApplicationWindow { property bool allow_background_mining : false property bool miningIgnoreBattery : true property var nettype: NetworkType.MAINNET - property string daemon_address: nettype == NetworkType.TESTNET ? "localhost:28081" : nettype == NetworkType.STAGENET ? "localhost:38081" : "localhost:18081" + property string daemon_address: "localhost:" + getDefaultDaemonRpcPort(nettype) property string payment_id property int restore_height : 0 property bool is_trusted_daemon : false @@ -1892,6 +1892,17 @@ ApplicationWindow { passwordDialog.open(); } + function getDefaultDaemonRpcPort(networkType) { + switch (networkType) { + case NetworkType.STAGENET: + return 38081; + case NetworkType.TESTNET: + return 28081; + default: + return 18081; + } + } + // Daemon console DaemonConsole { id: daemonConsolePopup |
