mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +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
@@ -88,20 +88,20 @@ static BlockAssembler::Options DefaultOptions(const CChainParams& params)
|
||||
options.nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT;
|
||||
options.nBlockMaxSize = DEFAULT_BLOCK_MAX_SIZE;
|
||||
bool fWeightSet = false;
|
||||
if (IsArgSet("-blockmaxweight")) {
|
||||
options.nBlockMaxWeight = GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
|
||||
if (gArgs.IsArgSet("-blockmaxweight")) {
|
||||
options.nBlockMaxWeight = gArgs.GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
|
||||
options.nBlockMaxSize = MAX_BLOCK_SERIALIZED_SIZE;
|
||||
fWeightSet = true;
|
||||
}
|
||||
if (IsArgSet("-blockmaxsize")) {
|
||||
options.nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE);
|
||||
if (gArgs.IsArgSet("-blockmaxsize")) {
|
||||
options.nBlockMaxSize = gArgs.GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE);
|
||||
if (!fWeightSet) {
|
||||
options.nBlockMaxWeight = options.nBlockMaxSize * WITNESS_SCALE_FACTOR;
|
||||
}
|
||||
}
|
||||
if (IsArgSet("-blockmintxfee")) {
|
||||
if (gArgs.IsArgSet("-blockmintxfee")) {
|
||||
CAmount n = 0;
|
||||
ParseMoney(GetArg("-blockmintxfee", ""), n);
|
||||
ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n);
|
||||
options.blockMinFeeRate = CFeeRate(n);
|
||||
} else {
|
||||
options.blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE);
|
||||
@@ -151,7 +151,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
|
||||
// -regtest only: allow overriding block.nVersion with
|
||||
// -blockversion=N to test forking scenarios
|
||||
if (chainparams.MineBlocksOnDemand())
|
||||
pblock->nVersion = GetArg("-blockversion", pblock->nVersion);
|
||||
pblock->nVersion = gArgs.GetArg("-blockversion", pblock->nVersion);
|
||||
|
||||
pblock->nTime = GetAdjustedTime();
|
||||
const int64_t nMedianTimePast = pindexPrev->GetMedianTimePast();
|
||||
@@ -272,7 +272,7 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
|
||||
nFees += iter->GetFee();
|
||||
inBlock.insert(iter);
|
||||
|
||||
bool fPrintPriority = GetBoolArg("-printpriority", DEFAULT_PRINTPRIORITY);
|
||||
bool fPrintPriority = gArgs.GetBoolArg("-printpriority", DEFAULT_PRINTPRIORITY);
|
||||
if (fPrintPriority) {
|
||||
LogPrintf("fee %s txid %s\n",
|
||||
CFeeRate(iter->GetModifiedFee(), iter->GetTxSize()).ToString(),
|
||||
|
||||
Reference in New Issue
Block a user