summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Rubin <j@rubin.io>2022-04-28 09:47:43 -0700
committerJeremy Rubin <j@rubin.io>2022-04-28 09:48:47 -0700
commit78fc9f2ceb1c4df79ca4089001529ef7cecbbcf9 (patch)
tree9493841e5f919b93d5c20450e64f771118870242
parentcad2b3ee775876b3d59268cb66e9e1aa3eae4222 (diff)
[BIP-119]: Make IsPayToBareDefaultCheckTemplateVerifyHash Pythonic
-rw-r--r--bip-0119.mediawiki11
1 files changed, 4 insertions, 7 deletions
diff --git a/bip-0119.mediawiki b/bip-0119.mediawiki
index e0e3b05..ba29d05 100644
--- a/bip-0119.mediawiki
+++ b/bip-0119.mediawiki
@@ -239,13 +239,10 @@ optimization.
A PayToBareDefaultCheckTemplateVerifyHash output matches the following template:
- bool CScript::IsPayToBareDefaultCheckTemplateVerifyHash() const
- {
- // Extra-fast test for pay-to-basic-standard-template CScripts:
- return (this->size() == 34 &&
- (*this)[0] == 0x20 &&
- (*this)[33] == OP_CHECKTEMPLATEVERIFY);
- }
+ # Extra-fast test for pay-to-basic-standard-template CScripts:
+ def is_pay_to_bare_default_check_template_verify_hash(self):
+ return len(self) == 34 and self[0] == 0x20 and self[-1] == OP_CHECKTEMPLATEVERIFY
+
==Deployment==