From 3b66e54457cdfe1f5ffda016d42c23fe848d539c Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 29 Jan 2016 01:28:54 +0000 Subject: Simplify check for replacebyfee=opt-in --- src/init.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/init.cpp b/src/init.cpp index 547e94ad61..80b014eb98 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1039,12 +1039,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 -- cgit v1.2.3