Professional Documents
Culture Documents
Free
Free
bitcoin / bitcoin
Sign up
// bit logic
// numeric
// crypto
// expansion
default:
return "OP_UNKNOWN";
}
unsigned int CScript::GetSigOpCount(bool fAccurate) const
unsigned int n = 0;
const_iterator pc = begin();
opcodetype opcode;
if (!GetOp(pc, opcode))
break;
n++;
n += DecodeOP_N(lastOpcode);
else
n += MAX_PUBKEYS_PER_MULTISIG;
lastOpcode = opcode;
return n;
if (!IsPayToScriptHash())
return GetSigOpCount(true);
const_iterator pc = scriptSig.begin();
opcodetype opcode;
return 0;
return 0;
return subscript.GetSigOpCount(true);
(*this)[22] == OP_EQUAL);
(*this)[1] == 0x20);
// A witness program is any valid CScript that consists of a 1-byte push opcode
return false;
return false;
if ((size_t)((*this)[1] + 2) == this->size()) {
version = DecodeOP_N((opcodetype)(*this)[0]);
program = std::vector<unsigned char>(this->begin() + 2, this->end());
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();
opcodetype opcode;
return false;
return true;
}
opcodeRet = OP_INVALIDOPCODE;
if (pvchRet)
pvchRet->clear();
return false;
// Read instruction
if (end - pc < 1)
return false;
// Immediate operand
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;
return false;
if (pvchRet)
pvchRet->assign(pc, pc + nSize);
pc += nSize;
opcodeRet = static_cast<opcodetype>(opcode);
return true;
Contact GitHub
Pricing
API
Training
Blog
About