Skip to content

Commit

Permalink
Remove -mempoolreplacement option
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimon committed Sep 23, 2017
1 parent 283fa9f commit e17e0b8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 31 deletions.
4 changes: 0 additions & 4 deletions doc/man/bitcoin-qt.1
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,6 @@ Relay and mine data carrier transactions (default: 1)
.IP
Maximum size of data in data carrier transactions we relay and mine
(default: 83)
.HP
\fB\-mempoolreplacement\fR
.IP
Enable transaction replacement in the memory pool (default: 1)
.PP
Block creation options:
.HP
Expand Down
4 changes: 0 additions & 4 deletions doc/man/bitcoind.1
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,6 @@ Relay and mine data carrier transactions (default: 1)
.IP
Maximum size of data in data carrier transactions we relay and mine
(default: 83)
.HP
\fB\-mempoolreplacement\fR
.IP
Enable transaction replacement in the memory pool (default: 1)
.PP
Block creation options:
.HP
Expand Down
10 changes: 0 additions & 10 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), DEFAULT_BYTES_PER_SIGOP));
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER));
strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY));
strUsage += HelpMessageOpt("-mempoolreplacement", strprintf(_("Enable transaction replacement in the memory pool (default: %u)"), DEFAULT_ENABLE_REPLACEMENT));

strUsage += HelpMessageGroup(_("Block creation options:"));
strUsage += HelpMessageOpt("-blockmaxweight=<n>", strprintf(_("Set maximum BIP141 block weight (default: %d)"), DEFAULT_BLOCK_MAX_WEIGHT));
Expand Down Expand Up @@ -1080,15 +1079,6 @@ bool AppInitParameterInteraction()

nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE);

fEnableReplacement = GetBoolArg("-mempoolreplacement", DEFAULT_ENABLE_REPLACEMENT);
if ((!fEnableReplacement) && IsArgSet("-mempoolreplacement")) {
// Minimal effort at forwards compatibility
std::string strReplacementModeList = GetArg("-mempoolreplacement", ""); // default is impossible
std::vector<std::string> vstrReplacementModes;
boost::split(vstrReplacementModes, strReplacementModeList, boost::is_any_of(","));
fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "fee") != vstrReplacementModes.end());
}

try {
InitGlobalAssetDir(mapMultiArgs.count("-assetdir") > 0 ? mapMultiArgs.at("-assetdir") : std::vector<std::string>());
} catch (const std::exception& e) {
Expand Down
14 changes: 4 additions & 10 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED;
size_t nCoinCacheUsage = 5000 * 300;
uint64_t nPruneTarget = 0;
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE;
bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT;

uint256 hashAssumeValid;

Expand Down Expand Up @@ -1099,15 +1098,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
// unconfirmed ancestors anyway; doing otherwise is hopelessly
// insecure.
bool fReplacementOptOut = true;
if (fEnableReplacement)
{
BOOST_FOREACH(const CTxIn &_txin, ptxConflicting->vin)
{
if (_txin.nSequence < std::numeric_limits<unsigned int>::max()-1)
{
fReplacementOptOut = false;
break;
}
BOOST_FOREACH(const CTxIn &_txin, ptxConflicting->vin) {
if (_txin.nSequence < std::numeric_limits<unsigned int>::max()-1) {
fReplacementOptOut = false;
break;
}
}
if (fReplacementOptOut)
Expand Down
3 changes: 0 additions & 3 deletions src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ static const bool DEFAULT_CHECKPOINTS_ENABLED = true;
static const bool DEFAULT_TXINDEX = false;
static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;

/** Default for -mempoolreplacement */
static const bool DEFAULT_ENABLE_REPLACEMENT = true;
/** Default for using fee filter */
static const bool DEFAULT_FEEFILTER = true;

Expand Down Expand Up @@ -178,7 +176,6 @@ extern CFeeRate minRelayTxFee;
extern CAmount maxTxFee;
/** If the tip is older than this (in seconds), the node is considered to be in initial block download. */
extern int64_t nMaxTipAge;
extern bool fEnableReplacement;

/** Block hash whose ancestors we will assume to have valid scripts without checking them. */
extern uint256 hashAssumeValid;
Expand Down

0 comments on commit e17e0b8

Please sign in to comment.