mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Accept replacebyfee=opt-in for turning on opt-in RBF
Basic forward-compatibility with more flexible parameters like fss
This commit is contained in:
parent
77b55a00ed
commit
d65dee961e
1 changed files with 15 additions and 0 deletions
15
src/init.cpp
15
src/init.cpp
|
@ -47,8 +47,10 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <boost/algorithm/string/classification.hpp>
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
|
#include <boost/algorithm/string/split.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
|
@ -1030,7 +1032,20 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||||
nLocalServices |= NODE_BLOOM;
|
nLocalServices |= NODE_BLOOM;
|
||||||
|
|
||||||
nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE);
|
nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE);
|
||||||
|
|
||||||
fEnableReplacement = GetBoolArg("-replacebyfee", DEFAULT_ENABLE_REPLACEMENT);
|
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
|
// ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue