Skip to content

Commit

Permalink
Make TX_SCRIPTHASH clear vSolutionsRet first
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petertodd authored and jtimon committed Oct 1, 2015
1 parent bb882d0 commit 6a07eb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/script/standard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 6a07eb6

Please sign in to comment.