aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/init.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index a7428531a7..291487a950 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -47,8 +47,10 @@
#include <signal.h>
#endif
+#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
+#include <boost/algorithm/string/split.hpp>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
@@ -1017,6 +1019,18 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
nLocalServices |= NODE_BLOOM;
fEnableReplacement = GetBoolArg("-replacebyfee", DEFAULT_ENABLE_REPLACEMENT);
+ if ((!fEnableReplacement) && mapArgs.count("-replacebyfee")) {
+ // Minimal effort at forwards compatibility
+ std::string strReplacementModeList = GetArg("-replacebyfee", ""); // default is impossible
+ std::vector<std::string> vstrReplacementModes;
+ boost::split(vstrReplacementModes, strReplacementModeList, boost::is_any_of(","));
+ BOOST_FOREACH(const std::string& strReplacementMode, vstrReplacementModes) {
+ if (strReplacementMode == "opt-in") {
+ fEnableReplacement = true;
+ break;
+ }
+ }
+ }
// ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log