Ignore -mempooltxinputlimit once Overwinter activates

This commit is contained in:
Jack Grigg
2018-03-19 15:13:10 +01:00
parent b7caaf954b
commit 31afbcc5c9
10 changed files with 108 additions and 17 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) {