mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
scripted-diff: stop using the gArgs wrappers
They were temporary additions to ease the transition. -BEGIN VERIFY SCRIPT- find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' -END VERIFY SCRIPT-
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
1227be30ec
commit
bb81e17355
@@ -101,7 +101,7 @@ void CConnman::AddOneShot(const std::string& strDest)
|
||||
|
||||
unsigned short GetListenPort()
|
||||
{
|
||||
return (unsigned short)(GetArg("-port", Params().GetDefaultPort()));
|
||||
return (unsigned short)(gArgs.GetArg("-port", Params().GetDefaultPort()));
|
||||
}
|
||||
|
||||
// find 'best' local address for a particular peer
|
||||
@@ -514,7 +514,7 @@ void CConnman::Ban(const CSubNet& subNet, const BanReason &banReason, int64_t ba
|
||||
banEntry.banReason = banReason;
|
||||
if (bantimeoffset <= 0)
|
||||
{
|
||||
bantimeoffset = GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME);
|
||||
bantimeoffset = gArgs.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME);
|
||||
sinceUnixEpoch = false;
|
||||
}
|
||||
banEntry.nBanUntil = (sinceUnixEpoch ? 0 : GetTime() )+bantimeoffset;
|
||||
@@ -1575,7 +1575,7 @@ void CConnman::ThreadDNSAddressSeed()
|
||||
// creating fewer identifying DNS requests, reduces trust by giving seeds
|
||||
// less influence on the network topology, and reduces traffic to the seeds.
|
||||
if ((addrman.size() > 0) &&
|
||||
(!GetBoolArg("-forcednsseed", DEFAULT_FORCEDNSSEED))) {
|
||||
(!gArgs.GetBoolArg("-forcednsseed", DEFAULT_FORCEDNSSEED))) {
|
||||
if (!interruptNet.sleep_for(std::chrono::seconds(11)))
|
||||
return;
|
||||
|
||||
@@ -2336,7 +2336,7 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
|
||||
// Send and receive from sockets, accept connections
|
||||
threadSocketHandler = std::thread(&TraceThread<std::function<void()> >, "net", std::function<void()>(std::bind(&CConnman::ThreadSocketHandler, this)));
|
||||
|
||||
if (!GetBoolArg("-dnsseed", true))
|
||||
if (!gArgs.GetBoolArg("-dnsseed", true))
|
||||
LogPrintf("DNS seeding disabled\n");
|
||||
else
|
||||
threadDNSAddressSeed = std::thread(&TraceThread<std::function<void()> >, "dnsseed", std::function<void()>(std::bind(&CConnman::ThreadDNSAddressSeed, this)));
|
||||
|
||||
Reference in New Issue
Block a user