diff --git a/src/miner.cpp b/src/miner.cpp index 6c361d5eb..1f72ff661 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -212,24 +212,11 @@ bool BlockAssembler::TestPackage(uint64_t packageSize, unsigned int packageSigOp // Perform transaction-level checks before adding to block: // - transaction finality (locktime) -// - premature witness (in case segwit transactions are added to mempool before -// segwit activation) -// - serialized size (in case -blockmaxsize is in use) bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& package) { - uint64_t nPotentialBlockSize = nBlockSize; // only used with fNeedSizeAccounting BOOST_FOREACH (const CTxMemPool::txiter it, package) { if (!IsFinalTx(it->GetTx(), nHeight, nLockTimeCutoff)) return false; - if (!fIncludeWitness && !it->GetTx().wit.IsNull()) - return false; - if (fNeedSizeAccounting) { - uint64_t nTxSize = ::GetSerializeSize(it->GetTx(), SER_NETWORK, PROTOCOL_VERSION); - if (nPotentialBlockSize + nTxSize >= nBlockMaxSize) { - return false; - } - nPotentialBlockSize += nTxSize; - } } return true; } @@ -421,7 +408,7 @@ void BlockAssembler::addPackageTxs() packageSigOps = modit->nSigOpCountWithAncestors; } - if (packageFees < ::minRelayTxFee.GetFee(packageSize) && nBlockSize >= nBlockMinSize) { + if (packageFees < ::minRelayTxFee.GetFee(packageSize)) { // Everything else we might consider has a lower fee rate return; } diff --git a/src/miner.h b/src/miner.h index b4059f5c1..4c8d6ef5b 100644 --- a/src/miner.h +++ b/src/miner.h @@ -188,7 +188,7 @@ private: /** Test if a new package would "fit" in the block */ bool TestPackage(uint64_t packageSize, unsigned int packageSigOps); /** Perform checks on each transaction in a package: - * locktime, premature-witness, serialized size (if necessary) + * locktime * These checks should always succeed, and they're here * only as an extra check in case of suboptimal node configuration */ bool TestPackageTransactions(const CTxMemPool::setEntries& package);