diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 149816406..38abdf9cb 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -170,9 +170,14 @@ public: // 546*minRelayTxFee/1000 (in satoshis) if (scriptPubKey.IsUnspendable()) return 0; - - size_t nSize = GetSerializeSize(SER_DISK,0)+148u; - return 3*minRelayTxFee.GetFee(nSize); + + // for lbrycrd this is mainly to prevent 0 value claims + // and some spam protection without limiting small + // lbrynet transactions + return 1; + // below is original bitcoin core code + //size_t nSize = GetSerializeSize(SER_DISK,0)+dd148u; + //return 3*minRelayTxFee.GetFee(nSize); } bool IsDust(const CFeeRate &minRelayTxFee) const diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 550a53c9c..1675b0690 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -337,8 +337,11 @@ BOOST_AUTO_TEST_CASE(test_IsStandard) BOOST_CHECK(IsStandardTx(t, reason)); // Check dust with default relay fee: - CAmount nDustThreshold = 182 * minRelayTxFee.GetFeePerK()/1000 * 3; - BOOST_CHECK_EQUAL(nDustThreshold, 546); + //CAmount nDustThreshold = 182 * minRelayTxFee.GetFeePerK()/1000 * 3; + //BOOST_CHECK_EQUAL(nDustThreshold, 546); + // lbry dust is set to 1, regardless of minRelayTxfee + CAmount nDustThreshold = 1; + // dust: t.vout[0].nValue = nDustThreshold - 1; BOOST_CHECK(!IsStandardTx(t, reason));