cleanup: remove unused CTransaction methods
This commit is contained in:
parent
1d231e1d9f
commit
38aba25232
|
@ -164,48 +164,6 @@ public:
|
|||
return (nValue == -1);
|
||||
}
|
||||
|
||||
CAmount GetDustThreshold(const CFeeRate &minRelayTxFeeRate) const
|
||||
{
|
||||
// "Dust" is defined in terms of CTransaction::minRelayTxFee,
|
||||
// which has units satoshis-per-kilobyte.
|
||||
// If you'd pay more than 1/3 in fees
|
||||
// to spend something, then we consider it dust.
|
||||
// A typical spendable non-segwit txout is 34 bytes big, and will
|
||||
// need a CTxIn of at least 148 bytes to spend:
|
||||
// so dust is a spendable txout less than
|
||||
// 546*minRelayTxFee/1000 (in satoshis).
|
||||
// A typical spendable segwit txout is 31 bytes big, and will
|
||||
// need a CTxIn of at least 67 bytes to spend:
|
||||
// so dust is a spendable txout less than
|
||||
// 294*minRelayTxFee/1000 (in satoshis).
|
||||
if (scriptPubKey.IsUnspendable())
|
||||
return 0;
|
||||
|
||||
/*
|
||||
size_t nSize = GetSerializeSize(*this, SER_DISK, 0);
|
||||
int witnessversion = 0;
|
||||
std::vector<unsigned char> witnessprogram;
|
||||
|
||||
if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
|
||||
// sum the sizes of the parts of a transaction input
|
||||
// with 75% segwit discount applied to the script size.
|
||||
nSize += (32 + 4 + 1 + (107 / WITNESS_SCALE_FACTOR) + 4);
|
||||
} else {
|
||||
nSize += (32 + 4 + 1 + 107 + 4); // the 148 mentioned above
|
||||
}
|
||||
|
||||
return 3 * minRelayTxFee.GetFee(nSize);
|
||||
*/
|
||||
|
||||
// Dogecoin: Anything below 1 DOGE is always dust
|
||||
return nDustLimit;
|
||||
}
|
||||
|
||||
bool IsDust(const CFeeRate &minRelayTxFeeRate) const
|
||||
{
|
||||
return (nValue < GetDustThreshold(minRelayTxFeeRate));
|
||||
}
|
||||
|
||||
// Dogecoin: allow comparison against different dustlimit parameters
|
||||
bool IsDust(const CAmount dustLimit) const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue