| 336 | } |
| 337 | |
| 338 | bool CScript::IsPayToWitnessPubkeyHash() const |
| 339 | { |
| 340 | // Extra-fast test for pay-to-witness-pubkey-hash CScripts: |
| 341 | return (this->size() == 22 && |
| 342 | (*this)[0] == OP_0 && |
| 343 | (*this)[1] == 0x14); |
| 344 | } |
| 345 | |
| 346 | // A witness program is any valid CScript that consists of a 1-byte push opcode |
| 347 | // followed by a data push between 2 and 40 bytes. |
no test coverage detected