|
|
@ -223,6 +223,29 @@ bool CScript::IsPayToScriptHash() const |
|
|
|
this->at(22) == OP_EQUAL); |
|
|
|
} |
|
|
|
|
|
|
|
bool CScript::IsPayToCryptoCondition() const |
|
|
|
{ |
|
|
|
const_iterator pc = this->begin(); |
|
|
|
vector<unsigned char> data; |
|
|
|
int i; |
|
|
|
while (pc < this->end()) |
|
|
|
{ |
|
|
|
opcodetype opcode; |
|
|
|
if (!this->GetOp(pc, opcode, data)) |
|
|
|
return 0; |
|
|
|
if (0 == i) |
|
|
|
if (opcode != OP_PUSHDATA1) |
|
|
|
return 0; |
|
|
|
if (1 == i) |
|
|
|
if (opcode != OP_CHECKCRYPTOCONDITION) |
|
|
|
return 0; |
|
|
|
if (i > 1) |
|
|
|
return 0; |
|
|
|
i++; |
|
|
|
} |
|
|
|
return 1; |
|
|
|
} |
|
|
|
|
|
|
|
bool CScript::IsPushOnly() const |
|
|
|
{ |
|
|
|
const_iterator pc = begin(); |
|
|
|