From d894c74c5f5d3342cd564c1fb9229cdd6374cd8f Mon Sep 17 00:00:00 2001 From: blondfrogs Date: Mon, 5 Nov 2018 08:27:49 -0700 Subject: [PATCH 1/2] Fix dust for assets, for non standard for assets --- src/policy/policy.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index 186dc5f679..a695bdc741 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -52,7 +52,11 @@ CAmount GetDustThreshold(const CTxOut& txout, const CFeeRate& dustRelayFeeIn) bool IsDust(const CTxOut& txout, const CFeeRate& dustRelayFeeIn) { - return (txout.nValue < GetDustThreshold(txout, dustRelayFeeIn)); + + if (txout.scriptPubKey.IsAssetScript()) + return false; + else + return (txout.nValue < GetDustThreshold(txout, dustRelayFeeIn)); } bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType, const bool witnessEnabled) @@ -73,11 +77,12 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType, const bool w } else if (whichType == TX_NULL_DATA && (!fAcceptDatacarrier || scriptPubKey.size() > nMaxDatacarrierBytes)) return false; - else if (!witnessEnabled && (whichType == TX_WITNESS_V0_KEYHASH || whichType == TX_WITNESS_V0_SCRIPTHASH)) return false; + else if (whichType == TX_TRANSFER_ASSET || whichType == TX_REISSUE_ASSET || whichType == TX_NEW_ASSET) + return true; - return whichType != TX_NONSTANDARD; + return whichType != TX_NONSTANDARD ; } bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnessEnabled) From c1544fac96341b3d81c20e08722e9e6202ce7066 Mon Sep 17 00:00:00 2001 From: blondfrogs Date: Mon, 5 Nov 2018 08:42:41 -0700 Subject: [PATCH 2/2] Update version --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 405448b9e4..ea66ada238 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 2) define(_CLIENT_VERSION_MINOR, 1) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_REVISION, 2) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2018)