Merge 2aff9a36c3 into merged_master (Bitcoin PR bitcoin/bitcoin#30352)

This commit is contained in:
ivanlele 2026-03-11 09:41:57 +00:00
commit cd6ec40d0f
No known key found for this signature in database
24 changed files with 202 additions and 6 deletions

View file

@ -318,6 +318,23 @@ bool CScript::IsPayToWitnessPubkeyHash() const
// END ELEMENTS
//
bool CScript::IsPayToAnchor() const
{
return (this->size() == 4 &&
(*this)[0] == OP_1 &&
(*this)[1] == 0x02 &&
(*this)[2] == 0x4e &&
(*this)[3] == 0x73);
}
bool CScript::IsPayToAnchor(int version, const std::vector<unsigned char>& program)
{
return version == 1 &&
program.size() == 2 &&
program[0] == 0x4e &&
program[1] == 0x73;
}
bool CScript::IsPayToScriptHash() const
{
// Extra-fast test for pay-to-script-hash CScripts: