diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-06-10 22:19:07 -0700 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-07-22 21:37:00 -0400 |
commit | 984d72ec659361d8c1a6f3c6864e839a807817a7 (patch) | |
tree | 893e16d6f36458f1925bb54bca43fc7674336e82 /src/script/standard.h | |
parent | 0a34593ddb7a6d10c19533754d7a23345a155986 (diff) | |
download | bitcoin-984d72ec659361d8c1a6f3c6864e839a807817a7.tar.xz |
Return the script type from Solver
Because false is synonymous with TX_NONSTANDARD, this conveys the same
information and makes the handling explicitly based on script type,
simplifying each call site.
Prior to this change it was common for the return value to be ignored,
or for the return value and TX_NONSTANDARD to be redundantly handled.
Diffstat (limited to 'src/script/standard.h')
-rw-r--r-- | src/script/standard.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script/standard.h b/src/script/standard.h index 1380030871..4728b056dd 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -135,11 +135,10 @@ const char* GetTxnOutputType(txnouttype t); * script hash, for P2PKH it will contain the key hash, etc. * * @param[in] scriptPubKey Script to parse - * @param[out] typeRet The script type * @param[out] vSolutionsRet Vector of parsed pubkeys and hashes - * @return True if script matches standard template + * @return The script type. TX_NONSTANDARD represents a failed solve. */ -bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet); +txnouttype Solver(const CScript& scriptPubKey, std::vector<std::vector<unsigned char>>& vSolutionsRet); /** * Parse a standard scriptPubKey for the destination address. Assigns result to |