aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Todd <pete@petertodd.org>2014-10-13 10:14:58 -0400
committerJorge Timón <jtimon@jtimon.cc>2015-10-01 18:27:22 +0200
commit6a07eb676a020b0035173facb25f92f1ff6380f7 (patch)
tree7c78eaa878e8a206b9412eb089224a7a85a590df /src
parentbb882d04e8626ba534200a44b58e7ac872a55dd0 (diff)
Make TX_SCRIPTHASH clear vSolutionsRet first
Previously unlike other transaction types the TX_SCRIPTHASH would not clear vSolutionsRet, which means that unlike other transaction types if it was called twice in a row you would get the result of the previous invocation as well.
Diffstat (limited to 'src')
-rw-r--r--src/script/standard.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 1d5aac7b34..59496d795d 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -58,6 +58,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN));
}
+ vSolutionsRet.clear();
+
// Shortcut for pay-to-script-hash, which are more constrained than the other types:
// it is always OP_HASH160 20 [20 byte hash] OP_EQUAL
if (scriptPubKey.IsPayToScriptHash())