[BIP-119]: Make IsPayToBareDefaultCheckTemplateVerifyHash Pythonic

This commit is contained in:
Jeremy Rubin committed 2022-04-28 09:48:47 -07:00
1 parent cad2b3ee77
commit 78fc9f2ceb
1 file changed
+4 -7
+4 -7
View File
@@ -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==