diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-04-10 20:13:32 -0700 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-04-10 20:13:32 -0700 |
commit | 3450a9b25cd6dbc69daf946bd3a610681ee61317 (patch) | |
tree | 7e72d27a4fdc3b92d53f660ac2dcce682f8d22a7 /src/script/standard.cpp | |
parent | 0a8054e7cd5c76d01e4ac7234e3883d05f6f5fdd (diff) |
Extract consts for WITNESS_V0 hash sizes
Diffstat (limited to 'src/script/standard.cpp')
-rw-r--r-- | src/script/standard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp index 0b9053d7fc..76778112aa 100644 --- a/src/script/standard.cpp +++ b/src/script/standard.cpp @@ -66,12 +66,12 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::v int witnessversion; std::vector<unsigned char> witnessprogram; if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) { - if (witnessversion == 0 && witnessprogram.size() == 20) { + if (witnessversion == 0 && witnessprogram.size() == WITNESS_V0_KEYHASH_SIZE) { typeRet = TX_WITNESS_V0_KEYHASH; vSolutionsRet.push_back(witnessprogram); return true; } - if (witnessversion == 0 && witnessprogram.size() == 32) { + if (witnessversion == 0 && witnessprogram.size() == WITNESS_V0_SCRIPTHASH_SIZE) { typeRet = TX_WITNESS_V0_SCRIPTHASH; vSolutionsRet.push_back(witnessprogram); return true; |