mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 12:52:35 -03:00
log parameter interactions to debug.log
This commit is contained in:
parent
ca1913e8f6
commit
df966d1b24
1 changed files with 17 additions and 9 deletions
26
src/init.cpp
26
src/init.cpp
|
@ -415,34 +415,42 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||||
if (mapArgs.count("-bind")) {
|
if (mapArgs.count("-bind")) {
|
||||||
// when specifying an explicit binding address, you want to listen on it
|
// when specifying an explicit binding address, you want to listen on it
|
||||||
// even when -connect or -proxy is specified
|
// 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) {
|
if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) {
|
||||||
// when only connecting to trusted nodes, do not seed via DNS, or listen by default
|
// when only connecting to trusted nodes, do not seed via DNS, or listen by default
|
||||||
SoftSetBoolArg("-dnsseed", false);
|
if (SoftSetBoolArg("-dnsseed", false))
|
||||||
SoftSetBoolArg("-listen", 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")) {
|
if (mapArgs.count("-proxy")) {
|
||||||
// to protect privacy, do not listen by default if a proxy server is specified
|
// to protect privacy, do not listen by default if a default proxy server is specified
|
||||||
SoftSetBoolArg("-listen", false);
|
if (SoftSetBoolArg("-listen", false))
|
||||||
|
LogPrintf("AppInit2 : parameter interaction: -proxy set -> setting -listen=0\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GetBoolArg("-listen", true)) {
|
if (!GetBoolArg("-listen", true)) {
|
||||||
// do not map ports or try to retrieve public IP when not listening (pointless)
|
// do not map ports or try to retrieve public IP when not listening (pointless)
|
||||||
SoftSetBoolArg("-upnp", false);
|
if (SoftSetBoolArg("-upnp", false))
|
||||||
SoftSetBoolArg("-discover", 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 (mapArgs.count("-externalip")) {
|
||||||
// if an explicit public IP is specified, do not try to find others
|
// 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)) {
|
if (GetBoolArg("-salvagewallet", false)) {
|
||||||
// Rewrite just private keys: rescan to find transactions
|
// 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
|
// Make sure enough file descriptors are available
|
||||||
|
|
Loading…
Reference in a new issue