Serialized script, used inside transaction inputs and outputs.
More...
#include <script.h>
|
| | CScript () |
| |
| | CScript (const_iterator pbegin, const_iterator pend) |
| |
| | CScript (std::vector< unsigned char >::const_iterator pbegin, std::vector< unsigned char >::const_iterator pend) |
| |
| | CScript (const unsigned char *pbegin, const unsigned char *pend) |
| |
| | SERIALIZE_METHODS (CScript, obj) |
| |
| | CScript (int64_t b) |
| |
| | CScript (opcodetype b) |
| |
| | CScript (const CScriptNum &b) |
| |
| | CScript (const std::vector< unsigned char > &b)=delete |
| |
| CScript & | operator<< (const CScript &b)=delete |
| | Delete non-existent operator to defend against future introduction. More...
|
| |
| CScript & | operator<< (int64_t b) |
| |
| CScript & | operator<< (opcodetype opcode) |
| |
| CScript & | operator<< (const CScriptNum &b) |
| |
| CScript & | operator<< (const std::vector< unsigned char > &b) |
| |
| bool | GetOp (const_iterator &pc, opcodetype &opcodeRet, std::vector< unsigned char > &vchRet) const |
| |
| bool | GetOp (const_iterator &pc, opcodetype &opcodeRet) const |
| |
| unsigned int | GetSigOpCount (bool fAccurate) const |
| | Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs as 20 sigops. More...
|
| |
| unsigned int | GetSigOpCount (const CScript &scriptSig) const |
| | Accurately count sigOps, including sigOps in pay-to-script-hash transactions: More...
|
| |
| bool | IsPayToScriptHash () const |
| |
| bool | IsPayToWitnessScriptHash () const |
| |
| bool | IsWitnessProgram (int &version, std::vector< unsigned char > &program) const |
| |
| bool | IsPushOnly (const_iterator pc) const |
| | Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). More...
|
| |
| bool | IsPushOnly () const |
| |
| bool | HasValidOps () const |
| | Check if the script contains valid OP_CODES. More...
|
| |
| bool | IsUnspendable () const |
| | Returns whether the script is guaranteed to fail at execution, regardless of the initial stack. More...
|
| |
| void | clear () |
| |
Serialized script, used inside transaction inputs and outputs.
Definition at line 404 of file script.h.
| CScript::CScript |
( |
const unsigned char * |
pbegin, |
|
|
const unsigned char * |
pend |
|
) |
| |
|
inline |
| CScript::CScript |
( |
int64_t |
b | ) |
|
|
inlineexplicit |
| CScript::CScript |
( |
const std::vector< unsigned char > & |
b | ) |
|
|
explicitdelete |
| static int CScript::DecodeOP_N |
( |
opcodetype |
opcode | ) |
|
|
inlinestatic |
Encode/decode small integers:
Definition at line 497 of file script.h.
| unsigned int CScript::GetSigOpCount |
( |
bool |
fAccurate | ) |
const |
Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs as 20 sigops.
With pay-to-script-hash, that changed: CHECKMULTISIGs serialized in scriptSigs are counted more accurately, assuming they are of the form ... OP_N CHECKMULTISIG ...
Definition at line 153 of file script.cpp.
| unsigned int CScript::GetSigOpCount |
( |
const CScript & |
scriptSig | ) |
const |
Accurately count sigOps, including sigOps in pay-to-script-hash transactions:
... and return its opcount:
Definition at line 177 of file script.cpp.
| bool CScript::HasValidOps |
( |
| ) |
const |
Check if the script contains valid OP_CODES.
Definition at line 270 of file script.cpp.
| bool CScript::IsPayToScriptHash |
( |
| ) |
const |
| bool CScript::IsPayToWitnessScriptHash |
( |
| ) |
const |
Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical).
Definition at line 236 of file script.cpp.
| bool CScript::IsPushOnly |
( |
| ) |
const |
| bool CScript::IsUnspendable |
( |
| ) |
const |
|
inline |
Returns whether the script is guaranteed to fail at execution, regardless of the initial stack.
This allows outputs to be pruned instantly when entering the UTXO set.
Definition at line 543 of file script.h.
| bool CScript::IsWitnessProgram |
( |
int & |
version, |
|
|
std::vector< unsigned char > & |
program |
|
) |
| const |
Delete non-existent operator to defend against future introduction.
| CScript& CScript::operator<< |
( |
int64_t |
b | ) |
|
|
inline |
| CScript& CScript::operator<< |
( |
const std::vector< unsigned char > & |
b | ) |
|
|
inline |
| CScript& CScript::push_int64 |
( |
int64_t |
n | ) |
|
|
inlineprotected |
| CScript::SERIALIZE_METHODS |
( |
CScript |
, |
|
|
obj |
|
|
) |
| |
|
inline |
The documentation for this class was generated from the following files: