Skip to content

Commit 6a07eb6

Browse files
petertoddjtimon
authored andcommitted
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.
1 parent bb882d0 commit 6a07eb6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/script/standard.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
5858
mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN));
5959
}
6060

61+
vSolutionsRet.clear();
62+
6163
// Shortcut for pay-to-script-hash, which are more constrained than the other types:
6264
// it is always OP_HASH160 20 [20 byte hash] OP_EQUAL
6365
if (scriptPubKey.IsPayToScriptHash())

0 commit comments

Comments
 (0)