diff options
| author | Wladimir J. van der Laan <[email protected]> | 2018-04-12 08:16:53 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2018-04-12 08:36:26 +0200 |
| commit | e561cf4fa865a89254e2e6839b3ef343e06951a2 (patch) | |
| tree | 6eb8e1b42cfaf45fc241277ac7d5cffaf7a5acc3 /src/script/standard.cpp | |
| parent | Merge #12947: Wallet hd functional test speedup and clarification (diff) | |
| parent | Extract consts for WITNESS_V0 hash sizes (diff) | |
| download | discoin-e561cf4fa865a89254e2e6839b3ef343e06951a2.tar.xz discoin-e561cf4fa865a89254e2e6839b3ef343e06951a2.zip | |
Merge #12939: Extract consts for WITNESS_V0 hash sizes
3450a9b Extract consts for WITNESS_V0 hash sizes (Ben Woosley)
Pull request description:
Tree-SHA512: 57ba84dfa36aa61cabffce747388143cf1c8724dd2fc42aecf93748158b75dbe278b21a32483a100b8c303f6ad01d048da03b0a5c172175febbe70938ed4339d
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 0b9053d7f..76778112a 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; |