mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
[RPC] signrawtransaction can sign P2WSH
This commit is contained in:
parent
f4691ab3a9
commit
745eb678ef
4 changed files with 12 additions and 3 deletions
|
|
@ -210,6 +210,14 @@ bool CScript::IsPayToScriptHash() const
|
|||
(*this)[22] == OP_EQUAL);
|
||||
}
|
||||
|
||||
bool CScript::IsPayToWitnessScriptHash() const
|
||||
{
|
||||
// Extra-fast test for pay-to-witness-script-hash CScripts:
|
||||
return (this->size() == 34 &&
|
||||
(*this)[0] == OP_0 &&
|
||||
(*this)[1] == 0x20);
|
||||
}
|
||||
|
||||
// A witness program is any valid CScript that consists of a 1-byte push opcode
|
||||
// followed by a data push between 2 and 40 bytes.
|
||||
bool CScript::IsWitnessProgram(int& version, std::vector<unsigned char>& program) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue