Dash Core  0.12.2.1
P2P Digital Currency
standard.h File Reference
#include "script/interpreter.h"
#include "uint256.h"
#include <boost/variant.hpp>
#include <stdint.h>

Go to the source code of this file.

Classes

class  CScriptID
 
class  CNoDestination
 

Typedefs

typedef boost::variant< CNoDestination, CKeyID, CScriptIDCTxDestination
 

Enumerations

enum  txnouttype {
  TX_NONSTANDARD, TX_PUBKEY, TX_PUBKEYHASH, TX_SCRIPTHASH,
  TX_MULTISIG, TX_NULL_DATA
}
 

Functions

const char * GetTxnOutputType (txnouttype t)
 
bool Solver (const CScript &scriptPubKey, txnouttype &typeRet, std::vector< std::vector< unsigned char > > &vSolutionsRet)
 
bool ExtractDestination (const CScript &scriptPubKey, CTxDestination &addressRet)
 
bool ExtractDestinations (const CScript &scriptPubKey, txnouttype &typeRet, std::vector< CTxDestination > &addressRet, int &nRequiredRet)
 
CScript GetScriptForDestination (const CTxDestination &dest)
 
CScript GetScriptForRawPubKey (const CPubKey &pubkey)
 
CScript GetScriptForMultisig (int nRequired, const std::vector< CPubKey > &keys)
 

Variables

static const bool DEFAULT_ACCEPT_DATACARRIER = true
 
static const unsigned int MAX_OP_RETURN_RELAY = 83
 
bool fAcceptDatacarrier
 bytes (+1 for OP_RETURN, +2 for the pushdata opcodes) More...
 
unsigned nMaxDatacarrierBytes
 
static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH
 

Typedef Documentation

◆ CTxDestination

typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination

A txout script template with a specific destination. It is either:

Definition at line 69 of file standard.h.

Enumeration Type Documentation

◆ txnouttype

enum txnouttype
Enumerator
TX_NONSTANDARD 
TX_PUBKEY 
TX_PUBKEYHASH 
TX_SCRIPTHASH 
TX_MULTISIG 
TX_NULL_DATA 

Definition at line 45 of file standard.h.

Function Documentation

◆ ExtractDestination()

◆ ExtractDestinations()

bool ExtractDestinations ( const CScript scriptPubKey,
txnouttype typeRet,
std::vector< CTxDestination > &  addressRet,
int &  nRequiredRet 
)

◆ GetScriptForDestination()

◆ GetScriptForMultisig()

CScript GetScriptForMultisig ( int  nRequired,
const std::vector< CPubKey > &  keys 
)

Definition at line 275 of file standard.cpp.

Referenced by _createmultisig_redeemScript().

◆ GetScriptForRawPubKey()

CScript GetScriptForRawPubKey ( const CPubKey pubkey)

Definition at line 270 of file standard.cpp.

Referenced by CWallet::AddHDPubKey(), CWallet::AddKeyPubKey(), and importpubkey().

◆ GetTxnOutputType()

const char* GetTxnOutputType ( txnouttype  t)

Definition at line 24 of file standard.cpp.

Referenced by ScriptPubKeyToJSON(), and ScriptPubKeyToUniv().

◆ Solver()

bool Solver ( const CScript scriptPubKey,
txnouttype typeRet,
std::vector< std::vector< unsigned char > > &  vSolutionsRet 
)

Variable Documentation

◆ DEFAULT_ACCEPT_DATACARRIER

const bool DEFAULT_ACCEPT_DATACARRIER = true
static

Definition at line 16 of file standard.h.

Referenced by AppInit2(), and HelpMessage().

◆ fAcceptDatacarrier

bool fAcceptDatacarrier

bytes (+1 for OP_RETURN, +2 for the pushdata opcodes)

Definition at line 19 of file standard.cpp.

Referenced by AppInit2(), and IsStandard().

◆ MANDATORY_SCRIPT_VERIFY_FLAGS

const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH
static

Mandatory script verification flags that all new blocks must comply with for them to be valid. (but old blocks may not comply with) Currently just P2SH, but in the future other flags may be added, such as a soft-fork to enforce strict DER encoding.

Failing one of these tests may trigger a DoS ban - see CheckInputs() for details.

Definition at line 43 of file standard.h.

Referenced by AcceptToMemoryPoolWorker().

◆ MAX_OP_RETURN_RELAY

const unsigned int MAX_OP_RETURN_RELAY = 83
static

Definition at line 30 of file standard.h.

Referenced by HelpMessage().

◆ nMaxDatacarrierBytes

unsigned nMaxDatacarrierBytes

Definition at line 20 of file standard.cpp.

Referenced by AppInit2(), and IsStandard().