Bitcoin Core  27.99.0
P2P Digital Currency
Functions | Variables
script.h File Reference
#include <crypto/sha256.h>
#include <script/script.h>
Include dependency graph for script.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool IsValidFlagCombination (unsigned flags)
 Flags that are not forbidden by an assert in script validation. More...
 

Variables

static const std::vector< uint8_t > WITNESS_STACK_ELEM_OP_TRUE {uint8_t{OP_TRUE}}
 
static const CScript P2WSH_OP_TRUE
 
static const std::vector< uint8_t > EMPTY {}
 
static const CScript P2WSH_EMPTY
 
static const std::vector< std::vector< uint8_t > > P2WSH_EMPTY_TRUE_STACK {{static_cast<uint8_t>(OP_TRUE)}, {}}
 
static const std::vector< std::vector< uint8_t > > P2WSH_EMPTY_TWO_STACK {{static_cast<uint8_t>(OP_2)}, {}}
 

Function Documentation

◆ IsValidFlagCombination()

bool IsValidFlagCombination ( unsigned  flags)

Flags that are not forbidden by an assert in script validation.

Definition at line 8 of file script.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ EMPTY

const std::vector<uint8_t> EMPTY {}
static

Definition at line 21 of file script.h.

◆ P2WSH_EMPTY

const CScript P2WSH_EMPTY
static
Initial value:
{
<< OP_0
<< ToByteVector([] {
uint256 hash;
CSHA256().Write(EMPTY.data(), EMPTY.size()).Finalize(hash.begin());
return hash;
}())}
A hasher class for SHA-256.
Definition: sha256.h:14
void Finalize(unsigned char hash[OUTPUT_SIZE])
Definition: sha256.cpp:728
CSHA256 & Write(const unsigned char *data, size_t len)
Definition: sha256.cpp:702
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:414
constexpr unsigned char * begin()
Definition: uint256.h:68
256-bit opaque blob.
Definition: uint256.h:106
std::vector< unsigned char > ToByteVector(const T &in)
Definition: script.h:66
@ OP_0
Definition: script.h:75
static const std::vector< uint8_t > EMPTY
Definition: script.h:21

Definition at line 22 of file script.h.

◆ P2WSH_EMPTY_TRUE_STACK

const std::vector<std::vector<uint8_t> > P2WSH_EMPTY_TRUE_STACK {{static_cast<uint8_t>(OP_TRUE)}, {}}
static

Definition at line 30 of file script.h.

◆ P2WSH_EMPTY_TWO_STACK

const std::vector<std::vector<uint8_t> > P2WSH_EMPTY_TWO_STACK {{static_cast<uint8_t>(OP_2)}, {}}
static

Definition at line 31 of file script.h.

◆ P2WSH_OP_TRUE

const CScript P2WSH_OP_TRUE
static
Initial value:
{
<< OP_0
<< ToByteVector([] {
uint256 hash;
return hash;
}())}
static const std::vector< uint8_t > WITNESS_STACK_ELEM_OP_TRUE
Definition: script.h:11

Definition at line 12 of file script.h.

◆ WITNESS_STACK_ELEM_OP_TRUE

const std::vector<uint8_t> WITNESS_STACK_ELEM_OP_TRUE {uint8_t{OP_TRUE}}
static

Definition at line 11 of file script.h.