1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-12 12:03:29 +00:00

Merge pull request #1226 from OrfeasLitos/define-check-119

Define BIP-119 CheckDefaultCheckTemplateVerifyHash
This commit is contained in:
Luke Dashjr 2021-12-15 21:36:04 +00:00 committed by GitHub
commit 1904334276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,6 +167,12 @@ specification for the semantics of OP_CHECKTEMPLATEVERIFY.
} }
break; break;
Where
bool CheckDefaultCheckTemplateVerifyHash(const std::vector<unsigned char>& hash) {
return GetDefaultCheckTemplateVerifyHash(current_tx, current_input_index) == uint256(hash);
}
The hash is computed as follows: The hash is computed as follows:
uint256 GetDefaultCheckTemplateVerifyHash(const CTransaction& tx, uint32_t input_index) { uint256 GetDefaultCheckTemplateVerifyHash(const CTransaction& tx, uint32_t input_index) {