Skip to content

Commit 3ff4a4c

Browse files
committed
Convert inside CheckDefaultCheckTemplateVerifyHash
1 parent 1839f43 commit 3ff4a4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bip-0119.mediawiki

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ specification for the semantics of OP_CHECKTEMPLATEVERIFY.
145145
// If the argument was not 32 bytes, treat as OP_NOP4:
146146
switch (stack.back().size()) {
147147
case 32:
148-
if (!checker.CheckDefaultCheckTemplateVerifyHash(uint256(stack.back()))) {
148+
if (!checker.CheckDefaultCheckTemplateVerifyHash(stack.back())) {
149149
return set_error(serror, SCRIPT_ERR_TEMPLATE_MISMATCH);
150150
}
151151
break;
@@ -161,8 +161,8 @@ specification for the semantics of OP_CHECKTEMPLATEVERIFY.
161161
162162
Where
163163

164-
bool CheckDefaultCheckTemplateVerifyHash(uint256 hash) {
165-
return GetDefaultCheckTemplateVerifyHash(current_tx, current_input_index) == hash;
164+
bool CheckDefaultCheckTemplateVerifyHash(const std::vector<unsigned char>& hash) {
165+
return GetDefaultCheckTemplateVerifyHash(current_tx, current_input_index) == uint256(hash);
166166
}
167167
168168
The hash is computed as follows:

0 commit comments

Comments
 (0)