Auto merge of #3098 - str4d:2343-overwinter-disable-mempooltxinputlimit, r=str4d

Ignore -mempooltxinputlimit once Overwinter activates

Overwinter changes the SignatureHash function to solve the quadratic hashing problem, so this option will no longer be needed.
This commit is contained in:
Homu
2018-03-30 08:33:58 -07:00
11 changed files with 112 additions and 21 deletions

View File

@@ -1169,6 +1169,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
// Node operator can choose to reject tx by number of transparent inputs
static_assert(std::numeric_limits<size_t>::max() >= std::numeric_limits<int64_t>::max(), "size_t too small");
size_t limit = (size_t) GetArg("-mempooltxinputlimit", 0);
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
limit = 0;
}
if (limit > 0) {
size_t n = tx.vin.size();
if (n > limit) {