mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
Merge pull request #7126
fa4b627
Move blocksonly parameter interaction to InitParameterInteraction() (MarcoFalke)
This commit is contained in:
commit
9ebedc1756
1 changed files with 1 additions and 11 deletions
12
src/init.cpp
12
src/init.cpp
|
@ -820,7 +820,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||||
// ********************************************************* Step 2: parameter interactions
|
// ********************************************************* Step 2: parameter interactions
|
||||||
const CChainParams& chainparams = Params();
|
const CChainParams& chainparams = Params();
|
||||||
|
|
||||||
|
// also see: InitParameterInteraction()
|
||||||
|
|
||||||
// if using block pruning, then disable txindex
|
// if using block pruning, then disable txindex
|
||||||
if (GetArg("-prune", 0)) {
|
if (GetArg("-prune", 0)) {
|
||||||
|
@ -833,16 +833,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable walletbroadcast and whitelistalwaysrelay in blocksonly mode
|
|
||||||
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
|
|
||||||
if (SoftSetBoolArg("-whitelistalwaysrelay", false))
|
|
||||||
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistalwaysrelay=0\n", __func__);
|
|
||||||
#ifdef ENABLE_WALLET
|
|
||||||
if (SoftSetBoolArg("-walletbroadcast", false))
|
|
||||||
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure enough file descriptors are available
|
// Make sure enough file descriptors are available
|
||||||
int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);
|
int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);
|
||||||
int nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
|
int nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
|
||||||
|
|
Loading…
Reference in a new issue