aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 7213477b22..4d16f46968 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -415,34 +415,42 @@ bool AppInit2(boost::thread_group& threadGroup)
if (mapArgs.count("-bind")) {
// when specifying an explicit binding address, you want to listen on it
// even when -connect or -proxy is specified
- SoftSetBoolArg("-listen", true);
+ if (SoftSetBoolArg("-listen", true))
+ LogPrintf("AppInit2 : parameter interaction: -bind set -> setting -listen=1\n");
}
if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) {
// when only connecting to trusted nodes, do not seed via DNS, or listen by default
- SoftSetBoolArg("-dnsseed", false);
- SoftSetBoolArg("-listen", false);
+ if (SoftSetBoolArg("-dnsseed", false))
+ LogPrintf("AppInit2 : parameter interaction: -connect set -> setting -dnsseed=0\n");
+ if (SoftSetBoolArg("-listen", false))
+ LogPrintf("AppInit2 : parameter interaction: -connect set -> setting -listen=0\n");
}
if (mapArgs.count("-proxy")) {
- // to protect privacy, do not listen by default if a proxy server is specified
- SoftSetBoolArg("-listen", false);
+ // to protect privacy, do not listen by default if a default proxy server is specified
+ if (SoftSetBoolArg("-listen", false))
+ LogPrintf("AppInit2 : parameter interaction: -proxy set -> setting -listen=0\n");
}
if (!GetBoolArg("-listen", true)) {
// do not map ports or try to retrieve public IP when not listening (pointless)
- SoftSetBoolArg("-upnp", false);
- SoftSetBoolArg("-discover", false);
+ if (SoftSetBoolArg("-upnp", false))
+ LogPrintf("AppInit2 : parameter interaction: -listen=0 -> setting -upnp=0\n");
+ if (SoftSetBoolArg("-discover", false))
+ LogPrintf("AppInit2 : parameter interaction: -listen=0 -> setting -discover=0\n");
}
if (mapArgs.count("-externalip")) {
// if an explicit public IP is specified, do not try to find others
- SoftSetBoolArg("-discover", false);
+ if (SoftSetBoolArg("-discover", false))
+ LogPrintf("AppInit2 : parameter interaction: -externalip set -> setting -discover=0\n");
}
if (GetBoolArg("-salvagewallet", false)) {
// Rewrite just private keys: rescan to find transactions
- SoftSetBoolArg("-rescan", true);
+ if (SoftSetBoolArg("-rescan", true))
+ LogPrintf("AppInit2 : parameter interaction: -salvagewallet=1 -> setting -rescan=1\n");
}
// Make sure enough file descriptors are available
@@ -983,7 +991,7 @@ bool AppInit2(boost::thread_group& threadGroup)
// scan for better chains in the block chain database, that are not yet connected in the active best chain
CValidationState state;
- if (!ConnectBestBlock(state))
+ if (!ActivateBestChain(state))
strErrors << "Failed to connect best block";
std::vector<boost::filesystem::path> vImportFiles;