diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2016-01-28 05:27:25 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2016-01-29 01:31:52 +0000 |
commit | e8d19ab79f9367d3adb43fb041b26f78f0f38eb3 (patch) | |
tree | 8c9e18014d2e577073f7c4af963a568408e03e24 /src | |
parent | 1205f87d36e70a29f30b2d05ddb80ac19d8ce398 (diff) |
Accept replacebyfee=opt-in for turning on opt-in RBF
Basic forward-compatibility with more flexible parameters like fss
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 14 |
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 |