mirror of
https://github.com/bitcoin/bips.git
synced 2025-03-13 11:09:16 +01:00
[BIP-119]: Make IsPayToBareDefaultCheckTemplateVerifyHash Pythonic
This commit is contained in:
parent
cad2b3ee77
commit
78fc9f2ceb
1 changed files with 4 additions and 7 deletions
|
@ -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==
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue