From 5f456a65467417629e104ea412b98aeabfaae1f8 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 29 Jan 2016 01:28:54 +0000 Subject: [PATCH] Simplify check for replacebyfee=opt-in --- src/init.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 291487a95..078fdda34 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1024,12 +1024,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) std::string strReplacementModeList = GetArg("-replacebyfee", ""); // default is impossible std::vector vstrReplacementModes; boost::split(vstrReplacementModes, strReplacementModeList, boost::is_any_of(",")); - BOOST_FOREACH(const std::string& strReplacementMode, vstrReplacementModes) { - if (strReplacementMode == "opt-in") { - fEnableReplacement = true; - break; - } - } + fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "opt-in") != vstrReplacementModes.end()); } // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log