Add support for pay2pubkey for -addressindex

This commit is contained in:
jl777
2018-06-26 04:40:32 -11:00
parent ba31c2f4b4
commit fa7bf712a1
7 changed files with 123 additions and 26 deletions

View File

@@ -229,6 +229,14 @@ bool CScript::IsPayToPublicKeyHash() const
(*this)[24] == OP_CHECKSIG);
}
bool CScript::IsPayToPublicKey() const
{
// Extra-fast test for pay-to-pubkey CScripts:
return (this->size() == 35 &&
(*this)[0] == 33 &&
(*this)[34] == OP_CHECKSIG);
}
bool CScript::IsPayToScriptHash() const
{
// Extra-fast test for pay-to-script-hash CScripts: