Re-enable dust threshold checks #34

Merged
kaykurokawa merged 2 commits from check_dust into master 2016-10-18 18:27:20 +02:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit b51444fd5c - Show all commits

View file

@ -177,8 +177,7 @@ public:
bool IsDust(const CFeeRate &minRelayTxFee) const 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) 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; CAmount nDustThreshold = 182 * minRelayTxFee.GetFeePerK()/1000 * 3;
BOOST_CHECK_EQUAL(nDustThreshold, 546); BOOST_CHECK_EQUAL(nDustThreshold, 546);
// dust: // dust:
//t.vout[0].nValue = nDustThreshold - 1; t.vout[0].nValue = nDustThreshold - 1;
//BOOST_CHECK(!IsStandardTx(t, reason)); BOOST_CHECK(!IsStandardTx(t, reason));
// not dust: // not dust:
t.vout[0].nValue = nDustThreshold; t.vout[0].nValue = nDustThreshold;
BOOST_CHECK(IsStandardTx(t, reason)); BOOST_CHECK(IsStandardTx(t, reason));