@ -919,12 +919,12 @@ bool AppInitParameterInteraction()
// Now remove the logging categories which were explicitly excluded
// Now remove the logging categories which were explicitly excluded
for ( const std : : string & cat : gArgs . GetArgs ( " -debugexclude " ) ) {
for ( const std : : string & cat : gArgs . GetArgs ( " -debugexclude " ) ) {
uint32_t flag = 0 ;
uint32_t flag = 0 ;
if ( ! GetLogCategory ( & flag , & cat ) ) {
if ( ! GetLogCategory ( & flag , & cat ) ) {
InitWarning ( strprintf ( _ ( " Unsupported logging category %s=%s. " ) , " -debugexclude " , cat ) ) ;
InitWarning ( strprintf ( _ ( " Unsupported logging category %s=%s. " ) , " -debugexclude " , cat ) ) ;
continue ;
continue ;
}
}
logCategories & = ~ flag ;
logCategories & = ~ flag ;
}
}
// Check for -debugnet
// Check for -debugnet
@ -1235,9 +1235,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
// sanitize comments per BIP-0014, format user agent and check total size
// sanitize comments per BIP-0014, format user agent and check total size
std : : vector < std : : string > uacomments ;
std : : vector < std : : string > uacomments ;
for ( const std : : string & cmt : gArgs . GetArgs ( " -uacomment " ) ) {
for ( const std : : string & cmt : gArgs . GetArgs ( " -uacomment " ) ) {
if ( cmt ! = SanitizeString ( cmt , SAFE_CHARS_UA_COMMENT ) )
if ( cmt ! = SanitizeString ( cmt , SAFE_CHARS_UA_COMMENT ) )
return InitError ( strprintf ( _ ( " User Agent comment (%s) contains unsafe characters . " ), cmt)) ;
return InitError ( strprintf ( _ ( " User Agent comment (%s) contains unsafe characters . " ), cmt)) ;
uacomments . push_back ( cmt ) ;
uacomments . push_back ( cmt ) ;
}
}
strSubVersion = FormatSubVersion ( CLIENT_NAME , CLIENT_VERSION , uacomments ) ;
strSubVersion = FormatSubVersion ( CLIENT_NAME , CLIENT_VERSION , uacomments ) ;
if ( strSubVersion . size ( ) > MAX_SUBVERSION_LENGTH ) {
if ( strSubVersion . size ( ) > MAX_SUBVERSION_LENGTH ) {
@ -1311,11 +1311,11 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
fRelayTxes = ! GetBoolArg ( " -blocksonly " , DEFAULT_BLOCKSONLY ) ;
fRelayTxes = ! GetBoolArg ( " -blocksonly " , DEFAULT_BLOCKSONLY ) ;
for ( const std : : string & strAddr : gArgs . GetArgs ( " -externalip " ) ) {
for ( const std : : string & strAddr : gArgs . GetArgs ( " -externalip " ) ) {
CService addrLocal ;
CService addrLocal ;
if ( Lookup ( strAddr . c_str ( ) , addrLocal , GetListenPort ( ) , fNameLookup ) & & addrLocal . IsValid ( ) )
if ( Lookup ( strAddr . c_str ( ) , addrLocal , GetListenPort ( ) , fNameLookup ) & & addrLocal . IsValid ( ) )
AddLocal ( addrLocal , LOCAL_MANUAL ) ;
AddLocal ( addrLocal , LOCAL_MANUAL ) ;
else
else
return InitError ( ResolveErrMsg ( " externalip " , strAddr ) ) ;
return InitError ( ResolveErrMsg ( " externalip " , strAddr ) ) ;
}
}
# if ENABLE_ZMQ
# if ENABLE_ZMQ
@ -1588,29 +1588,29 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
connOptions . nMaxOutboundLimit = nMaxOutboundLimit ;
connOptions . nMaxOutboundLimit = nMaxOutboundLimit ;
for ( const std : : string & strBind : gArgs . GetArgs ( " -bind " ) ) {
for ( const std : : string & strBind : gArgs . GetArgs ( " -bind " ) ) {
CService addrBind ;
CService addrBind ;
if ( ! Lookup ( strBind . c_str ( ) , addrBind , GetListenPort ( ) , false ) ) {
if ( ! Lookup ( strBind . c_str ( ) , addrBind , GetListenPort ( ) , false ) ) {
return InitError ( ResolveErrMsg ( " bind " , strBind ) ) ;
return InitError ( ResolveErrMsg ( " bind " , strBind ) ) ;
}
}
connOptions . vBinds . push_back ( addrBind ) ;
connOptions . vBinds . push_back ( addrBind ) ;
}
}
for ( const std : : string & strBind : gArgs . GetArgs ( " -whitebind " ) ) {
for ( const std : : string & strBind : gArgs . GetArgs ( " -whitebind " ) ) {
CService addrBind ;
CService addrBind ;
if ( ! Lookup ( strBind . c_str ( ) , addrBind , 0 , false ) ) {
if ( ! Lookup ( strBind . c_str ( ) , addrBind , 0 , false ) ) {
return InitError ( ResolveErrMsg ( " whitebind " , strBind ) ) ;
return InitError ( ResolveErrMsg ( " whitebind " , strBind ) ) ;
}
}
if ( addrBind . GetPort ( ) = = 0 ) {
if ( addrBind . GetPort ( ) = = 0 ) {
return InitError ( strprintf ( _ ( " Need to specify a port with -whitebind: '%s' " ) , strBind ) ) ;
return InitError ( strprintf ( _ ( " Need to specify a port with -whitebind: '%s' " ) , strBind ) ) ;
}
}
connOptions . vWhiteBinds . push_back ( addrBind ) ;
connOptions . vWhiteBinds . push_back ( addrBind ) ;
}
}
for ( const auto & net : gArgs . GetArgs ( " -whitelist " ) ) {
for ( const auto & net : gArgs . GetArgs ( " -whitelist " ) ) {
CSubNet subnet ;
CSubNet subnet ;
LookupSubNet ( net . c_str ( ) , subnet ) ;
LookupSubNet ( net . c_str ( ) , subnet ) ;
if ( ! subnet . IsValid ( ) )
if ( ! subnet . IsValid ( ) )
return InitError ( strprintf ( _ ( " Invalid netmask specified in -whitelist: '%s' " ) , net ) ) ;
return InitError ( strprintf ( _ ( " Invalid netmask specified in -whitelist: '%s' " ) , net ) ) ;
connOptions . vWhitelistedRange . push_back ( subnet ) ;
connOptions . vWhitelistedRange . push_back ( subnet ) ;
}
}
if ( gArgs . IsArgSet ( " -seednode " ) ) {
if ( gArgs . IsArgSet ( " -seednode " ) ) {