mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Make it possible to unconditionally RBF with mempoolreplacement=fee,-optin
This commit is contained in:
parent
d0cccad9d4
commit
0853a234a4
3 changed files with 16 additions and 1 deletions
10
src/init.cpp
10
src/init.cpp
|
|
@ -1153,8 +1153,16 @@ bool AppInitParameterInteraction()
|
|||
// Minimal effort at forwards compatibility
|
||||
std::string strReplacementModeList = gArgs.GetArg("-mempoolreplacement", ""); // default is impossible
|
||||
std::vector<std::string> vstrReplacementModes;
|
||||
boost::split(vstrReplacementModes, strReplacementModeList, boost::is_any_of(","));
|
||||
boost::split(vstrReplacementModes, strReplacementModeList, boost::is_any_of(",+"));
|
||||
fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "fee") != vstrReplacementModes.end());
|
||||
if (fEnableReplacement) {
|
||||
fReplacementHonourOptOut = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "-optin") == vstrReplacementModes.end());
|
||||
if (!fReplacementHonourOptOut) {
|
||||
nLocalServices = ServiceFlags(nLocalServices | NODE_REPLACE_BY_FEE);
|
||||
}
|
||||
} else {
|
||||
fReplacementHonourOptOut = true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue