Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

dashconsensus.cpp File Reference
#include <script/dashconsensus.h>
#include <primitives/transaction.h>
#include <pubkey.h>
#include <script/interpreter.h>
#include <version.h>
+ Include dependency graph for dashconsensus.cpp:

Go to the source code of this file.

Functions

static bool verify_flags (unsigned int flags)
 Check that all specified flags are part of the libconsensus interface. More...
 
int dashconsensus_verify_script (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, dashconsensus_error *err)
 Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scriptPubKey pointed to by scriptPubKey under the additional constraints specified by flags. More...
 
unsigned int dashconsensus_version ()
 

Function Documentation

◆ dashconsensus_verify_script()

int dashconsensus_verify_script ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
dashconsensus_error err 
)

Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scriptPubKey pointed to by scriptPubKey under the additional constraints specified by flags.

If not nullptr, err will contain an error/success code for the operation

Definition at line 79 of file dashconsensus.cpp.

References dashconsensus_ERR_INVALID_FLAGS, dashconsensus_ERR_OK, dashconsensus_ERR_TX_DESERIALIZE, dashconsensus_ERR_TX_INDEX, dashconsensus_ERR_TX_SIZE_MISMATCH, deserialize, flags, GetSerializeSize(), PROTOCOL_VERSION, SER_NETWORK, verify_flags(), VerifyScript(), and CTransaction::vin.

◆ dashconsensus_version()

unsigned int dashconsensus_version ( )

Definition at line 105 of file dashconsensus.cpp.

References BITCOINCONSENSUS_API_VER.

◆ verify_flags()

static bool verify_flags ( unsigned int  flags)
static

Check that all specified flags are part of the libconsensus interface.

Definition at line 74 of file dashconsensus.cpp.

References dashconsensus_SCRIPT_FLAGS_VERIFY_ALL, and flags.

Referenced by dashconsensus_verify_script().

Released under the MIT license