feat(daemon): set default network to MAINNET
This commit is contained in:
parent
93dd9768c5
commit
b592bfbd68
|
@ -38,13 +38,14 @@ const getDaemonOptions = ({ username, password, optionsFromZcashConf }) => {
|
|||
-metricsrefreshtime
|
||||
Number of seconds between metrics refreshes
|
||||
*/
|
||||
|
||||
const defaultOptions = [
|
||||
'-showmetrics',
|
||||
'--metricsui=0',
|
||||
'-metricsrefreshtime=1',
|
||||
`-rpcuser=${username}`,
|
||||
`-rpcpassword=${password}`,
|
||||
...(isTestnet ? ['-testnet', '-addnode=testnet.z.cash'] : ['-addnode=mainnet.z.cash']),
|
||||
...(isTestnet() ? ['-testnet', '-addnode=testnet.z.cash'] : ['-addnode=mainnet.z.cash']),
|
||||
// Overwriting the settings with values taken from "zcash.conf"
|
||||
...optionsFromZcashConf,
|
||||
];
|
||||
|
@ -103,6 +104,13 @@ const runDaemon: () => Promise<?ChildProcess> = () => new Promise(async (resolve
|
|||
return resolve();
|
||||
}
|
||||
|
||||
store.set(EMBEDDED_DAEMON, true);
|
||||
|
||||
// Default to mainnet
|
||||
if (!store.get(ZCASH_NETWORK)) {
|
||||
store.set(ZCASH_NETWORK, MAINNET);
|
||||
}
|
||||
|
||||
if (!optionsFromZcashConf.rpcuser) store.set('rpcuser', uuid());
|
||||
if (!optionsFromZcashConf.rpcpassword) store.set('rpcpassword', uuid());
|
||||
|
||||
|
|
Loading…
Reference in New Issue