Professional Documents
Culture Documents
BBTTCC
BBTTCC
return n;
if (!IsPayToScriptHash())
return GetSigOpCount(true);
const_iterator pc = scriptSig.begin();
opcodetype opcode;
return 0;
return 0;
(*this)[22] == OP_EQUAL);
(*this)[1] == 0x20);
// A witness program is any valid CScript that consists of a 1-byte push opcode
{
if (this->size() < 4 || this->size() > 42) {
return false;
return false;
if ((size_t)((*this)[1] + 2) == this->size()) {
version = DecodeOP_N((opcodetype)(*this)[0]);
return true;
return false;
opcodetype opcode;
if (!GetOp(pc, opcode))
return false;
return false;
}
return true;
return this->IsPushOnly(begin());
if (i) {
ret += HexStr(stack[i]);
CScript::const_iterator it = begin();
return false;
return true;
opcodeRet = OP_INVALIDOPCODE;
if (pvchRet)
pvchRet->clear();
return false;
// Read instruction
if (end - pc < 1)
return false;
// Immediate operand
if (opcode <= OP_PUSHDATA4)
nSize = opcode;
if (end - pc < 1)
return false;
nSize = *pc++;
if (end - pc < 2)
return false;
nSize = ReadLE16(&pc[0]);
pc += 2;
if (end - pc < 4)
return false;
nSize = ReadLE32(&pc[0]);
pc += 4;
if (pvchRet)
pvchRet->assign(pc, pc + nSize);
pc += nSize;
opcodeRet = static_cast<opcodetype>(opcode);
return true;
Contact GitHub
Pricing
API
Training
Blog
About