aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-01-21 13:15:19 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-02-01 15:28:25 +0100
commit5d743099b5fe77ba423110bea4f5dfd854fef3b2 (patch)
treee1b1a23d1900150100a938c831bc5eebffa06aec /src/script
parent196ad6913ff57cd39caf0b262267e67c5a143467 (diff)
Get rid of inaccurate ScriptSigArgsExpected
(cherry picked from commit 52b29dca7670c3f6d2ab918c0fff1d17c4e494ad)
Diffstat (limited to 'src/script')
-rw-r--r--src/script/standard.cpp21
-rw-r--r--src/script/standard.h1
2 files changed, 0 insertions, 22 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 30935768ac..67b6af327a 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -161,27 +161,6 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
return false;
}
-int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions)
-{
- switch (t)
- {
- case TX_NONSTANDARD:
- case TX_NULL_DATA:
- return -1;
- case TX_PUBKEY:
- return 1;
- case TX_PUBKEYHASH:
- return 2;
- case TX_MULTISIG:
- if (vSolutions.size() < 1 || vSolutions[0].size() < 1)
- return -1;
- return vSolutions[0][0] + 1;
- case TX_SCRIPTHASH:
- return 1; // doesn't include args needed by the script
- }
- return -1;
-}
-
bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
{
vector<valtype> vSolutions;
diff --git a/src/script/standard.h b/src/script/standard.h
index 6bac6e4097..64bf010ec1 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -71,7 +71,6 @@ typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
const char* GetTxnOutputType(txnouttype t);
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
-int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);