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.
This commit is contained in:
Peter Todd 2014-10-13 10:14:58 -04:00 committed by Jack Grigg
parent 4884e75c8c
commit cf6cf56a68
No known key found for this signature in database
GPG Key ID: 9E8255172BBF9898
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,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())