Skip to content

Commit 18514d3

Browse files
kwvgPastaPastaPasta
authored andcommitted
args: replace leftover boolean GetArg calls with GetBoolArg
1 parent 9964cbe commit 18514d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/init.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ void PrepareShutdown(NodeContext& node)
296296
node.banman.reset();
297297
node.addrman.reset();
298298

299-
if (node.mempool && node.mempool->IsLoaded() && node.args->GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
299+
if (node.mempool && node.mempool->IsLoaded() && node.args->GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
300300
DumpMempool(*node.mempool);
301301
}
302302

@@ -1231,10 +1231,10 @@ bool AppInitParameterInteraction(const ArgsManager& args)
12311231

12321232
if (args.IsArgSet("-devnet")) {
12331233
// Require setting of ports when running devnet
1234-
if (args.GetArg("-listen", DEFAULT_LISTEN) && !args.IsArgSet("-port")) {
1234+
if (args.GetBoolArg("-listen", DEFAULT_LISTEN) && !args.IsArgSet("-port")) {
12351235
return InitError(_("-port must be specified when -devnet and -listen are specified"));
12361236
}
1237-
if (args.GetArg("-server", false) && !args.IsArgSet("-rpcport")) {
1237+
if (args.GetBoolArg("-server", false) && !args.IsArgSet("-rpcport")) {
12381238
return InitError(_("-rpcport must be specified when -devnet and -server are specified"));
12391239
}
12401240
if (args.GetArgs("-devnet").size() > 1) {

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4668,7 +4668,7 @@ bool CChainState::LoadBlockIndexDB()
46684668
void CChainState::LoadMempool(const ArgsManager& args)
46694669
{
46704670
if (!m_mempool) return;
4671-
if (args.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
4671+
if (args.GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
46724672
assert(std::addressof(::ChainstateActive()) == std::addressof(*this));
46734673
::LoadMempool(*m_mempool, *this);
46744674
}

0 commit comments

Comments
 (0)