aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/main.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-05 19:11:20 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-05 19:11:20 +0200
commit4f93f745284c10f12e2524f5211030085d9626cf (patch)
tree29b5f359a8f346305bcf7bf82f459f421bfaa7a7 /src/daemon/main.cpp
parentMerge pull request #3273 (diff)
parentWallet API: generalize 'bool testnet' to 'NetworkType nettype' (diff)
downloadmonero-4f93f745284c10f12e2524f5211030085d9626cf.tar.xz
Merge pull request #3277
0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu) af773211 Stagenet (stoffu) cc9a0bee command_line: allow args to depend on more than one args (stoffu) 55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu) 450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu) 9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
Diffstat (limited to 'src/daemon/main.cpp')
-rw-r--r--src/daemon/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 752a92ba4..50384b2a6 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -138,6 +138,14 @@ int main(int argc, char const * argv[])
return 0;
}
+ const bool testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on);
+ const bool stagenet = command_line::get_arg(vm, cryptonote::arg_stagenet_on);
+ if (testnet && stagenet)
+ {
+ std::cerr << "Can't specify more than one of --tesnet and --stagenet" << ENDL;
+ return 1;
+ }
+
std::string db_type = command_line::get_arg(vm, cryptonote::arg_db_type);
// verify that blockchaindb type is valid