From b3c5b1e88de5ff0f5e8496d7d8d4d21cc0795e7e Mon Sep 17 00:00:00 2001 From: Brannon King Date: Thu, 29 Aug 2019 11:11:45 -0600 Subject: [PATCH] simplified claim stripping, removed TX_CLAIM --- src/bloom.cpp | 3 +-- src/policy/policy.cpp | 10 +++------- src/script/sign.cpp | 6 +----- src/script/standard.cpp | 23 ++++++++++------------- src/script/standard.h | 1 - src/wallet/wallet.cpp | 4 +--- 6 files changed, 16 insertions(+), 31 deletions(-) diff --git a/src/bloom.cpp b/src/bloom.cpp index d3504f98e..9cd70429a 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -167,8 +167,7 @@ bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx) { txnouttype type; std::vector > vSolutions; - const CScript& scriptPubKey = StripClaimScriptPrefix(txout.scriptPubKey); - if (Solver(scriptPubKey, type, vSolutions) && + if (Solver(txout.scriptPubKey, type, vSolutions) && (type == TX_PUBKEY || type == TX_MULTISIG)) insert(COutPoint(hash, i)); } diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index 3e6e74955..ccc9d141f 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -10,11 +10,9 @@ #include #include #include -#include -#include #include -#include "nameclaim.h" +#include CAmount GetDustThreshold(const CTxOut& txout, const CFeeRate& dustRelayFeeIn) @@ -117,8 +115,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason) unsigned int nDataOut = 0; txnouttype whichType; for (const CTxOut& txout : tx.vout) { - const CScript& scriptPubKey = StripClaimScriptPrefix(txout.scriptPubKey); - if (!::IsStandard(scriptPubKey, whichType)) { + if (!::IsStandard(txout.scriptPubKey, whichType)) { reason = "scriptpubkey"; return false; } @@ -171,8 +168,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) std::vector > vSolutions; txnouttype whichType; // get the scriptPubKey corresponding to this input: - const CScript& prevScript = StripClaimScriptPrefix(prev.scriptPubKey); - if (!Solver(prevScript, whichType, vSolutions)) + if (!Solver(prev.scriptPubKey, whichType, vSolutions)) return false; if (whichType == TX_SCRIPTHASH) diff --git a/src/script/sign.cpp b/src/script/sign.cpp index ecaf337f2..a95a8609b 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -11,8 +11,6 @@ #include