diff options
author | Orfeas Litos <orfeas.litos@hotmail.com> | 2021-11-12 01:08:46 +0100 |
---|---|---|
committer | Orfeas Litos <orfeas.litos@hotmail.com> | 2021-11-12 01:08:46 +0100 |
commit | 3ff4a4ce9d52fa762fbb9b6f9da74b0b3689a11e (patch) | |
tree | 89b1843eb35d86b5485efebb766f2a74689f8941 | |
parent | 1839f437797c20bca6bdde73e365f3c10d078930 (diff) |
Convert inside CheckDefaultCheckTemplateVerifyHash
-rw-r--r-- | bip-0119.mediawiki | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bip-0119.mediawiki b/bip-0119.mediawiki index 5d33a15..6422ac7 100644 --- a/bip-0119.mediawiki +++ b/bip-0119.mediawiki @@ -145,7 +145,7 @@ specification for the semantics of OP_CHECKTEMPLATEVERIFY. // If the argument was not 32 bytes, treat as OP_NOP4: switch (stack.back().size()) { case 32: - if (!checker.CheckDefaultCheckTemplateVerifyHash(uint256(stack.back()))) { + if (!checker.CheckDefaultCheckTemplateVerifyHash(stack.back())) { return set_error(serror, SCRIPT_ERR_TEMPLATE_MISMATCH); } break; @@ -161,8 +161,8 @@ specification for the semantics of OP_CHECKTEMPLATEVERIFY. Where - bool CheckDefaultCheckTemplateVerifyHash(uint256 hash) { - return GetDefaultCheckTemplateVerifyHash(current_tx, current_input_index) == hash; + bool CheckDefaultCheckTemplateVerifyHash(const std::vector<unsigned char>& hash) { + return GetDefaultCheckTemplateVerifyHash(current_tx, current_input_index) == uint256(hash); } The hash is computed as follows: |