From 78fc9f2ceb1c4df79ca4089001529ef7cecbbcf9 Mon Sep 17 00:00:00 2001 From: Jeremy Rubin Date: Thu, 28 Apr 2022 09:47:43 -0700 Subject: [PATCH] [BIP-119]: Make IsPayToBareDefaultCheckTemplateVerifyHash Pythonic --- bip-0119.mediawiki | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bip-0119.mediawiki b/bip-0119.mediawiki index e0e3b05c..ba29d05d 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==