mirror of
https://github.com/bitcoin/bips.git
synced 2025-01-19 05:45:07 +01:00
Convert inside CheckDefaultCheckTemplateVerifyHash
This commit is contained in:
parent
1839f43779
commit
3ff4a4ce9d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user