Re-enable dust threshold checks

This commit is contained in:
kkurokawa 2016-08-07 18:58:14 -04:00
parent 774246d16f
commit b51444fd5c
2 changed files with 3 additions and 4 deletions

View file

@ -177,8 +177,7 @@ public:
bool IsDust(const CFeeRate &minRelayTxFee) const
{
return false;
// return (nValue < GetDustThreshold(minRelayTxFee));
return (nValue < GetDustThreshold(minRelayTxFee));
}
friend bool operator==(const CTxOut& a, const CTxOut& b)

View file

@ -340,8 +340,8 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
CAmount nDustThreshold = 182 * minRelayTxFee.GetFeePerK()/1000 * 3;
BOOST_CHECK_EQUAL(nDustThreshold, 546);
// dust:
//t.vout[0].nValue = nDustThreshold - 1;
//BOOST_CHECK(!IsStandardTx(t, reason));
t.vout[0].nValue = nDustThreshold - 1;
BOOST_CHECK(!IsStandardTx(t, reason));
// not dust:
t.vout[0].nValue = nDustThreshold;
BOOST_CHECK(IsStandardTx(t, reason));