mirror of
https://github.com/bitcoin/bips.git
synced 2025-05-12 12:03:29 +00:00
[BIP-119]: Make IsPayToBareDefaultCheckTemplateVerifyHash Pythonic
This commit is contained in:
parent
cad2b3ee77
commit
78fc9f2ceb
@ -239,13 +239,10 @@ optimization.
|
|||||||
|
|
||||||
A PayToBareDefaultCheckTemplateVerifyHash output matches the following template:
|
A PayToBareDefaultCheckTemplateVerifyHash output matches the following template:
|
||||||
|
|
||||||
bool CScript::IsPayToBareDefaultCheckTemplateVerifyHash() const
|
# Extra-fast test for pay-to-basic-standard-template CScripts:
|
||||||
{
|
def is_pay_to_bare_default_check_template_verify_hash(self):
|
||||||
// Extra-fast test for pay-to-basic-standard-template CScripts:
|
return len(self) == 34 and self[0] == 0x20 and self[-1] == OP_CHECKTEMPLATEVERIFY
|
||||||
return (this->size() == 34 &&
|
|
||||||
(*this)[0] == 0x20 &&
|
|
||||||
(*this)[33] == OP_CHECKTEMPLATEVERIFY);
|
|
||||||
}
|
|
||||||
|
|
||||||
==Deployment==
|
==Deployment==
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user