diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -264,14 +264,6 @@ // GetValueIn() is a method on CCoinsViewCache, because // inputs must be known to compute value in. - // Compute priority, given priority of inputs and (optionally) tx size - double ComputePriority(double dPriorityInputs, - unsigned int nTxSize = 0) const; - - // Compute modified tx size for priority calculation (optionally given tx - // size) - unsigned int CalculateModifiedSize(unsigned int nTxSize = 0) const; - /** * Get the total transaction size in bytes. * @return Total transaction size in bytes diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -83,36 +83,6 @@ return nValueOut; } -double CTransaction::ComputePriority(double dPriorityInputs, - unsigned int nTxSize) const { - nTxSize = CalculateModifiedSize(nTxSize); - if (nTxSize == 0) { - return 0.0; - } - - return dPriorityInputs / nTxSize; -} - -unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const { - // In order to avoid disincentivizing cleaning up the UTXO set we don't - // count the constant overhead for each txin and up to 110 bytes of - // scriptSig (which is enough to cover a compressed pubkey p2sh redemption) - // for priority. Providing any more cleanup incentive than making additional - // inputs free would risk encouraging people to create junk outputs to - // redeem later. - if (nTxSize == 0) { - nTxSize = GetTotalSize(); - } - for (const auto &nVin : vin) { - unsigned int offset = - 41U + std::min(110U, (unsigned int)nVin.scriptSig.size()); - if (nTxSize > offset) { - nTxSize -= offset; - } - } - return nTxSize; -} - unsigned int CTransaction::GetTotalSize() const { return ::GetSerializeSize(*this, PROTOCOL_VERSION); } diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -71,8 +71,6 @@ Amount nFee; //!< ... and avoid recomputing tx size size_t nTxSize; - //!< ... and modified size for priority - size_t nModSize; //!< ... and total memory usage size_t nUsageSize; //!< Local time when entering the mempool diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -33,7 +33,6 @@ spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOpsCount), lockPoints(lp) { nTxSize = tx->GetTotalSize(); - nModSize = tx->CalculateModifiedSize(GetTxSize()); nUsageSize = RecursiveDynamicUsage(tx); nCountWithDescendants = 1;