Remove SegWit related checks added by backporting of Bitcoin #8295
Also remove nBlockMinSize check from addPackageTxs. Removed by SegWit related commits in Bitcoin.
This commit is contained in:
parent
f9f3b8d938
commit
6a993236be
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user