Skip to content

Commit 78fc9f2

Browse files
committed
[BIP-119]: Make IsPayToBareDefaultCheckTemplateVerifyHash Pythonic
1 parent cad2b3e commit 78fc9f2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bip-0119.mediawiki

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,10 @@ optimization.
239239

240240
A PayToBareDefaultCheckTemplateVerifyHash output matches the following template:
241241

242-
bool CScript::IsPayToBareDefaultCheckTemplateVerifyHash() const
243-
{
244-
// Extra-fast test for pay-to-basic-standard-template CScripts:
245-
return (this->size() == 34 &&
246-
(*this)[0] == 0x20 &&
247-
(*this)[33] == OP_CHECKTEMPLATEVERIFY);
248-
}
242+
# Extra-fast test for pay-to-basic-standard-template CScripts:
243+
def is_pay_to_bare_default_check_template_verify_hash(self):
244+
return len(self) == 34 and self[0] == 0x20 and self[-1] == OP_CHECKTEMPLATEVERIFY
245+
249246

250247
==Deployment==
251248

0 commit comments

Comments
 (0)