diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 067b1fcc0..149816406 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -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) diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 0e35af45e..550a53c9c 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -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));